SQL: Conditional used in where clause

Tags:
SQL
In SQL, what are the conditional used in where clause?
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • TheRealRaven
    It's not clear what problem is solved by answering the question. It seems to be homework or interview. Can you explain why you need to know (rather than studying documentation)?
    36,880 pointsBadges:
    report
  • Subhendu Sen

    How do we work with SQL?

    Already replied your Q, it is better to see the one.


    142,210 pointsBadges:
    report
  • ToddN2000
    What conditions are you looking to learn more on?
    136,240 pointsBadges:
    report
  • ToddN2000
    There are far to many ways to condition your data in a list here. If you are more specific to your issue we can provide a solution.

    Example:

    select o6btky,o6ord#,ohff3,ohenty,ohentm,month,row_number() over(partition by ohenty,ohentm) as daily_count,
    row_number() over(partition by ohenty,month) as monthly_count
    from
    (select distinct o6btky,o6ord#,ohff3,ohenty,ohentm,int(ohentm/100) as month
    from o6
    join ohp on o6ord#= ohord#
    where ohdiv = '01' and o6sufx = 0 and ohff3 <> ' ' and
    ((ohenty=14 and ohentm>=1021) or ohenty =15)
    and (odpn = '11EP' or odpn = '11TR')
    order by ohff3,o6ord#) as d
    order by ohenty,month,ohentm
    136,240 pointsBadges:
    report
  • TheRealRaven
    I read the question as asking us to list predicates or clauses that can condition terms in a WHERE clause. Or asking us to give a definition. No indication if it's ANSI SQL, Microsoft's SQL, MySQL nor any of the other possible variations (nor any actual problem); so it seems simple academic research.
    36,880 pointsBadges:
    report
  • ToddN2000
    Also is the format for interactive use or stored procedure or other methods. It does vary a bit.
    136,240 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: