|
Posted by Yas on 07/27/07 21:47
Hello,
I have Table1 with column Email, which has mail addresses in the
format 'useremailid@'. Few of these Email values are NULL where no
mail address was specified.
In my View1 I'm using SUBSTRING like... Left(Email,CHARINDEX('@',
Email)-1) AS EMAIL_NAME (to cut out the @ sign) FROM Table1 and get
just the usermailid
Anyway, what I would like to do is use the above to get all the
usermailids and have a condition that checks if Email field IS NULL
and if TRUE replaces it with blank value ''
So something like IF (Email IS NULL) THEN Email = ''
I've never really used IF ELSE in a query and would be gratefull if
someone could help me out. I don't want to leave out the NULL values
using WHERE Email is NOT NULL, I just want to convert them to an empty
string ''
Many thanks in advance :-)
Yas
Navigation:
[Reply to this message]
|