IIf in view

Pauldohert

Something in here
Local time
Yesterday, 16:45
Joined
Apr 6, 2004
Messages
2,101
How do I put a derived field into a view iN SQL Server

In access I would have

IIf([field1] = True,"",[Field2])

Or Alertantively can I return a Null instaed of the zero length string.

IIf([field1] = True,Null,[Field2])

Thanks
 
Last edited:
For this particular example I can get way with


LEFT(Field2, LEN(Field2) * ~ Field1) AS Expr1


But only because field1 is yes,no
 
for the null replacement you can do

ISNULL(FieldName,ReplacementValue)
 

Users who are viewing this thread

Back
Top Bottom