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 |
karamjeet2004
Starting Member
1 Post |
Posted - 2014-02-04 : 07:07:33
|
any alternative to this query, i dont want to use temp tables.select * from (if(@i=1)select queryelseselect query) |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2014-02-04 : 07:25:56
|
just this is enoughselect querywhere @i=1union allselect querywhere @i<>1 ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|