[thelist] MS SS7 - SELECT [computed field] syntax question

r937 rudy at r937.com
Fri Jan 25 11:20:49 CST 2008


i think your problem might have been the doublequotes

"XX" is a column

'XX' is a string

(too much ms access in your background, perhaps)

also, stay away from IF, use CASE whenever possible

   SELECT Field_1
        , Field_2
        , Field_3
        , CASE WHEN Field_1 = 'XX'
                AND Field_2 = 'YY'
               THEN 'New Value'
               ELSE Field_3 END     AS New_Field_3
     FROM daTable


rudy
http://r937.com/





More information about the thelist mailing list