HiI am trying to call a function multiple times as I want to display records depending on the returned results in the query, and depending on the value of a column being null in the returend results. So what I want to do is this:SELECT ColumnA,CASE WHEN ColumnA IS NULL THENdbo.Function(ColumnB, 'First') AS 'A - First',dbo.Function(ColumnB, 'Second') AS 'A - Second',dbo.Function(ColumnB, 'Third') AS 'A - Third'ELSEdbo.Function(ColumnB, 'First') AS 'B - First',dbo.Function(ColumnB, 'Second') AS 'B - Second',dbo.Function(ColumnB, 'Third') AS 'B - Third'END,ColumnC,ColumnDFrom .....
but keep getting the following error when I run it:quote:
Incorrect syntax near the keyword 'AS'.