Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 converting IIF access line of code to SQL Server

Author  Topic 

burt247
Starting Member

2 Posts

Posted - 2010-07-29 : 22:09:27
trying to convert to case statement


IIF [received_records] = 0, [shipped_records], IIF ([received_records]) IS NULL, [shipped_records]as [total shipped_records]

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-07-29 : 23:22:12
you're missing the 3rd part of the 2nd IIF statement.

but it looks like you're trying to do this
CASE WHEN ISNULL(received_records, 0) = 0
THEN shipped_records
ELSE received_records
END as [total shipped_records]
Go to Top of Page
   

- Advertisement -