similarly i want to check 15 condition in else if state ment
Else if (@CategoryId<>'' and @AdType<>'' and @VALUES<>'')
Else if (@CategoryId<>'' and @VALUES<>'')
Else if (@CategoryId<>'' and @AdType<>'' )
Else if (@Location<>''and @VALUES<>'')
in the same proc
inorder to make shrort the store proc condition i asked for dynamic sql query i tried a sample sql query in my question it self i have mentioned
when i execute all parameter means it is showing result
sivaganesh12...
Member
227 Points
308 Posts
Re: how to make dynamic sql select query for the select query with condition 3 table with ?
May 28, 2012 08:55 AM|LINK
yogi similarly i just want to find
similarly i want to check 15 condition in else if state ment
Else if (@CategoryId<>'' and @AdType<>'' and @VALUES<>'')
Else if (@CategoryId<>'' and @VALUES<>'')
Else if (@CategoryId<>'' and @AdType<>'' )
Else if (@Location<>''and @VALUES<>'')
in the same proc
inorder to make shrort the store proc condition i asked for dynamic sql query i tried a sample sql query in my question it self i have mentioned
when i execute all parameter means it is showing result
EXEC [dbo].[SP_data]
@CategoryId=N'247',
@VALUES = N'Agra chennai numgambkm',
@Location=N'chennai',
@AdType =N'b'
but when i execute yhis mean iam not getting output
EXEC [dbo].[SP_data]
@CategoryId=N'247',
@VALUES = N'Agra chennai numgambkm',
@Location=N'',
@AdType =N''
similarly for this also
EXEC [dbo].[SP_data]
@CategoryId=N'247',
@VALUES = N'',
@Location=N'',
@AdType =N''