Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIF in SQL-Statements / views / stored procs 1

Status
Not open for further replies.

pharcyder

Programmer
Mar 12, 2002
66
DE
Hello,

we're transferring our Access Database to an ADP-Project,
thus were not using the queries in Access but views in SQL-Server.

The problem is that the function "iif" is not working in views / stored procedures.

I need a column where either 'NULL' or text is saved to give back 'Yes' or 'No'. In Access-SQL it worked like this:
Iif([fieldname] Is Null, "No","Yes")

Can I perhaps write a function to give this special column back and use it in a view or is there any other way to "convert" one column basing on the source-column ?

TIA,
Jens K.

 
Thanks, that was a superfast answer, just 5 minutes after I posted mine [2thumbsup]

Greetings from Germany,
Jens
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top