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 |
learntsql
524 Posts |
Posted - 2010-09-07 : 03:46:44
|
Hi All,DECLARE @tab table(Code varchar(10),CodeValue varchar(100))insert into @tabselect 'C1','CV1'unionselect '','CV2'unionselect 'C2',''unionselect null,'CV3'unionselect null,nullselect * from @tabNow i have load this data into another table by ignoring nulls and emptystring from both the columnsi.e the output must containC1,CV1TIA |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-09-07 : 04:40:04
|
select * from @tabwhere coalesce(code,'')<>'' and coalesce(codevalue,'')<>'' orselect * from @tabwhere code>'' and codevalue>''MadhivananFailing to plan is Planning to fail |
 |
|
learntsql
524 Posts |
Posted - 2010-09-07 : 04:57:11
|
Thanks Madhi... |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-09-07 : 05:01:47
|
quote: Originally posted by learntsql Thanks Madhi...
You are welcome MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|