Thursday, January 13, 2011

NULLIF:set a field null in a condition in ms sql

select NULLIF(sampleTable.Field,'') from sampleTable

this line checks sampleTable.Field field
data if it is '' then result turns as NULL

No comments: