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 |
|
damuchinni
Starting Member
29 Posts |
Posted - 2007-11-05 : 00:32:54
|
| Hi Im beginer in sql,Please guide can insert statement works fine in case when functionfor examplecase when condition1=true then (first insert statement based on some condition) when condition2=true then (second insert statement based on some other condition)end |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-11-05 : 00:39:52
|
use IF ... ELSE statement KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
damuchinni
Starting Member
29 Posts |
Posted - 2007-11-05 : 00:42:04
|
| if else statement is nothing but case when rite my question is that "insert statement works fine in if else " |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-11-05 : 01:31:09
|
quote: Originally posted by damuchinni if else statement is nothing but case when rite my question is that "insert statement works fine in if else "
No. Test and seeMadhivananFailing to plan is Planning to fail |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-11-05 : 01:59:43
|
quote: Originally posted by damuchinni if else statement is nothing but case when rite my question is that "insert statement works fine in if else "
Yes. It works very fine. KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-11-05 : 03:48:09
|
| moved from script library_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
 |
|
|
|
|
|