Hi,
I have never tried the same but it can be done. From my point of view check below comments
1. Using "If Else" as you will pass parameter from front end.
2. You can also check the same by making use of dynamic SQLs.
Check this updated one....
Quote:Ive added my query could u tell me how to do the above comments
ALTER PROC PR_DYNAMIC_OPERATORS
(
@PA_OPERATOR VARCHAR(100)
)
AS
BEGIN
DECLARE @SQL VARCHAR(200)
SET @SQL = 'SELECT 1 WHERE 2 ' + @PA_OPERATOR + ' 1'
PRINT(@SQL)
EXEC (@SQL)
END
Hope this will help you.
Cheers