Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
benko
Starting Member
24 Posts |
Posted - 2004-11-08 : 11:51:21
|
| quick question...is there a function to check for like isblank just like isNull. Cause the field isnt null it is blank. Thanks in advance. |
|
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2004-11-08 : 12:01:58
|
| field = ''rockmoose |
 |
|
|
benko
Starting Member
24 Posts |
Posted - 2004-11-08 : 17:43:14
|
| What about in a select statement, like Select rxFeild = isnull(@field, 'All') but i need to be able to check for blank rather than null. I dont want to do If statement if i dont have to. Just trying to find a more efficient way! Thanks |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-11-08 : 17:45:18
|
| SELECT *FROM Table1WHERE rxField = ''Tara |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2004-11-08 : 21:12:05
|
| Or are you looking for a CASE statement?SELECT rxFeild = CASE WHEN rxFeild='' THEN 'All' ELSE rxFeild ENDFROM Table1I don't know if it is more efficient, but you could also doSELECT rxFeild = IsNull(NullIf(rxFeild, ''), 'All')FROM Table1Kristen |
 |
|
|
|
|
|