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 |
svibuk
Yak Posting Veteran
62 Posts |
Posted - 2013-10-11 : 03:13:11
|
IN SP i have the AND EI.IID =TL.IID AND EI.GID=TL.GID and TL.QID=EI.ID WHERE EI.TYPE='P'but i need and TL.QID=EI.ID only when @QID>0 if not > 0 the i dont need to add and TL.QID=EI.IDi tried below |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-10-11 : 03:15:45
|
use boolean logic to bypass...AND EI.IID =TL.IID AND EI.GID=TL.GID and (TL.QID=EI.ID OR @QID<=0 )WHERE EI.TYPE='P' ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
svibuk
Yak Posting Veteran
62 Posts |
Posted - 2013-10-11 : 07:42:45
|
Thankssolved the issue |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-10-11 : 08:15:13
|
cheers------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|