Query to Stored Procedure

  • Thread starter Thread starter Keith Emery
  • Start date Start date
K

Keith Emery

I have a query that needs to be converted to a stored
procedure.

In the query, I use an IIF statement to format a gendeer
ID to "M" or "F"

IIF([Gender]=0,"M","F")

How should this be entered into the stored procedure? It
reject a straight SQL paste
 
I have a query that needs to be converted to a stored
procedure.

In the query, I use an IIF statement to format a gendeer
ID to "M" or "F"

IIF([Gender]=0,"M","F")

How should this be entered into the stored procedure? It
reject a straight SQL paste

Hi Keith,

Is this a SQL Server stored procedure?

CASE
WHEN ([Gender]=0)
THEN "M"
ELSE "F"
END
 
Back
Top