Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use AS with logical expr in SQL Server
Message
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01288504
Message ID:
01288512
Views:
10
This message has been marked as the solution to the initial question of the thread.
SELECT CAST ( CASE WHEN status = 'A' THEN 1 ELSE 0 END AS bit) AS Rule1
>I have the following SQL Select in VFP application which I need to adopt for SQL Server:
>
>
>select STATUS=A AS RULE1 From MyTable
>
>
>When I pass the above SQL (using SPT) to SQL Server I get error "Incorrect syntax new keyword AS". It must be because SQL Server does not have a logical type and/or it does not support AS.
>
>How can I modify the above SQL Select? RULE1 can have 0 or 1 (not necessarily logical).
>
>Thank you.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform