Is it possible to have a IIF statement in a view. Trying to get the below to work, but not being successful.
Code:
SELECT dlv.Record_Type, dlv.[Option], dlv.Delivery_Reference, dlv.Contract, dlv.Supplier_Code AS Sup_Code, sup.Sup_Desc, dlv.Delivery_Date, dlv.Movement_Amount_Sign, dlv.Qty_Delivered, dlv.Expected_Date,
dlv.Original_Contract, dlv.Date_Updated, dlv.ID,iif(Left(dlv.Delivery_Reference,2)="01","Test")