joycesolomon
MIS
Hi ,
I have an Access SQL as this:
SELECT IIf(IsNull([Last Name]),IIf(IsNull([First Name]),[Company],[First Name]),IIf(IsNull([First Name]),[Last Name],[Last Name] & ", " & [First Name])) AS [File As]
Which i converted to A CASE statement in SQL:
SELECT CASE WHEN IsNull([Last Name, 0]) THEN CASE WHEN IsNull([First Name,0])THEN [Company] ELSE [First Name] END ELSE CASE WHEN IsNull([First Name,0])THEN [Last Name] ELSE [Last Name] & [,] & [First Name] END END AS [File As]
FROM dbo.Contacts
And it keeps giving error "the isnull function requires two arguments". Can someone please help me with this, what is the mistake that i have
I have an Access SQL as this:
SELECT IIf(IsNull([Last Name]),IIf(IsNull([First Name]),[Company],[First Name]),IIf(IsNull([First Name]),[Last Name],[Last Name] & ", " & [First Name])) AS [File As]
Which i converted to A CASE statement in SQL:
SELECT CASE WHEN IsNull([Last Name, 0]) THEN CASE WHEN IsNull([First Name,0])THEN [Company] ELSE [First Name] END ELSE CASE WHEN IsNull([First Name,0])THEN [Last Name] ELSE [Last Name] & [,] & [First Name] END END AS [File As]
FROM dbo.Contacts
And it keeps giving error "the isnull function requires two arguments". Can someone please help me with this, what is the mistake that i have