Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How 2 do this in TSQL?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
Database:
MS SQL Server
Miscellaneous
Thread ID:
01042027
Message ID:
01042029
Views:
21
>How would I best do something like this in T-SQL?
>
>SELECT IIF(ISNULL(int_field),0,1) AS lSelected FROM MyTable
>
>Do I use a SQL CASE statement, or is there an easier in-line way?
>
Yes, you'll use CASE function
CASE WHEN int_field IS NULL THEN 0 ELSE 1 END AS ...
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform