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

NULLIF

Status
Not open for further replies.

manmaria

Technical User
Aug 8, 2003
286
0
0
US
I want to null if it satisfy 2 conditions OR MORE like

NULLIF (COLUMN1=' ' OR COLUMN1='0' OR OR COLUMN1='00'XB)

But it is not working right now. Is there any other way I can do this.

Thanks
 
You have to use
NULLIF (COLUMN1=' ') OR (COLUMN2='00'XB) OR (COLUMNS3='0')

Hope this will help you.

 
CASE WHEN COLUMN1=' ' OR COLUMN1='0' OR OR COLUMN1='00'XB
THEN NULL
ELSE COLUMN1
END

or

CASE WHEN COLUMN1 IN (' ','0','00'XB)
THEN NULL
ELSE COLUMN1
END


Dieter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top