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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use an IFF in the SELECT clause 1

Status
Not open for further replies.

bartdedecker

Programmer
Feb 22, 2005
17
BE
Hi,

How can I use an IFF in my select clause.
I have a column VAT_NUMBER (nvarchar(50)) in my Table. I want an extra column in the result of my query. If the VAT_NUMBER is not null then return 1 otherwise return a 0.
(I use SQL Server 2000)

Code:
SELECT 
   NAME,VAT_NUMBER, ???VAT_NUMBER_YN???
FROM 
   USERS

Thx in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top