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 |
|
chedderslam
Posting Yak Master
223 Posts |
Posted - 2009-02-19 : 11:50:54
|
| I have an insert that I only want to run if a column for a record has length gt 0.I have poked around google and here and can't find a solution that works.Can anyone provide an example?Thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-19 : 11:55:39
|
| [code]insert into tableSELECT columns....FROM table2WHERE LEN(yourcolumn)>0[/code] |
 |
|
|
chedderslam
Posting Yak Master
223 Posts |
Posted - 2009-02-19 : 12:11:43
|
| Even better than the conditional logic I had planned. Thanks for the quick help.Cheers! |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-19 : 12:14:05
|
welcome |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-02-20 : 03:13:17
|
| orinsert into tableSELECT columns....FROM table2WHERE yourcolumn>''MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|