Wednesday, July 13, 2016

Access IIf() function to SQL Server equivalent

What is the SQL Server equivalent to Access IIf() function?


Access SQL
  • IIf([ResultValue]>=1, [Result Value], Null)


SQL Server
  •  CASE WHEN [Result Value]>=1
  •    THEN [Result Value]
  •    ELSE NULL 
  •  END 

No comments: