Hi
I am getting data from Cte
I want if @ICode parameter is not null then select statement should execute with parameter else all data
SELECT * from cteCab where icode = @ICode
else select * from ctetab
Thanks
Hi
I am getting data from Cte
I want if @ICode parameter is not null then select statement should execute with parameter else all data
SELECT * from cteCab where icode = @ICode
else select * from ctetab
Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Nitin SontakkeRank #264 · 9.6K reputationPosted Dec 17, 2021, 3:11 AM EST