Query help

  • elee1969 (7/3/2013)


    Luis Cazares (7/3/2013)


    You can use a CASE statement.

    SELECT q.Course_Code, CASE WHEN res.[4a] = 0 THEN 0 ELSE 6-res.[4a] END as [4a],

    ...

    ah thanks luis. 🙂 i knew it would be the CASE statement but didn't know how i would work it into the Select section. Thanks again !!

    or:

    SELECT q.Course_Code, 6 - ISNULL(NULLIF(res.[4a],0),6) as [4a],

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

Viewing post 16 (of 15 total)

You must be logged in to reply to this topic. Login to reply