June 23, 2008 at 7:07 am
Is anything similar to this possible without writing whole query in every begin block or without dynamic sql:
proc(@arg1 bit)
select * from table where x=y
if @arg1 = 1 begin
and when a=b
end
order by date
June 23, 2008 at 7:29 am
proc(@arg1 bit)
select * from table where x=y
and (a=b or @arg1=0)
June 23, 2008 at 8:04 am
Also asked and answered here
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=105355
N 56°04'39.16"
E 12°55'05.25"
June 23, 2008 at 9:41 am
Peso (6/23/2008)
Also asked and answered here
This is funny 🙂
* Noel
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply