I have much MSACCESS expeience and am new to SQL so here goes...
I am trying to create calculated fields in a view, but can't seem to
more complex calculations to work.
I can create a new field which does simple arithmetic on two other
fields and rename it so it becomes part of the new view to be queried
by other views, but when I use more complicated constructs I can't
seem to get them to work.
For starters:
How do you create a new field that has a number based on an IF
construct based on another field.
Example:
field1 has state abbrevs and field 2 should have a "1" if field1="NY".
In access I do field2:IIF(field1="NY",1,0),
How do I accomplish this in MS SQL.
Can it be done in the view?
Thanks,
Brad