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 |
gps.suga
Starting Member
2 Posts |
Posted - 2008-08-25 : 02:45:35
|
Hi, any one can Help my problem.I select values and assign variable from table and insert into another temp table for constructing insett script. My problem is, in selected variables have null value(if db null also) in variable, i could not construct the insert sript. Bcoz i coudnot assign null value to the variable.select @col1 = isnull(col1,NULL),@col2 = isnull(col2,null) from tableinsert into #temp(col1,col2) values (@col1,@col2)Thanks, |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-25 : 02:52:12
|
what do you want to insert as default value when value in your source column is NULL? |
 |
|
gps.suga
Starting Member
2 Posts |
Posted - 2008-08-25 : 07:29:20
|
i am dynamicaly constructing insert script. For that i don't know if column value is null or some value.Thanks. |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-25 : 07:37:53
|
quote: Originally posted by gps.suga i am dynamicaly constructing insert script. For that i don't know if column value is null or some value.Thanks.
Then change the value to some defualt value |
 |
|
|
|
|