• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 381
  • Last Modified:

IIF Statement in SQL

I would usually use the following statment in microsoft access, however I can't get it to work in SQL server any ideas

SELECT IIf([AddressedDate] Is Null,[TargetDate],[PredictedCompletion]) AS [Order], * FROM Tjobrecord;


Thanks
0
Sometimes
Asked:
Sometimes
1 Solution
 
HilaireCommented:
Please try

SELECT case when [AddressedDate] Is Null then [TargetDate] else [PredictedCompletion] end AS [Order], * FROM Tjobrecord;
0
 
SometimesAuthor Commented:
Thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now