C
Charles
I am trying to selct o Stored Procedure based on an input
parameter and a specified one (Cancelled = True). Below
is the sysntax after the select query. They work
independant of each other but not together as displayed
below:
IF @UserID Is NOT NULL
BEGIN
SELECT @SQLString = 'WHERE UserID = ''' + @UserID + ''''
SELECT @SQLString = @SQLString + ' an Cancelled = True'
SELECT @SelectList = @SelectList + ' ' + @SQLString
END
Help... What to do?
--Execute the SQL statement.
EXECUTE(@SELECTLIST)
parameter and a specified one (Cancelled = True). Below
is the sysntax after the select query. They work
independant of each other but not together as displayed
below:
IF @UserID Is NOT NULL
BEGIN
SELECT @SQLString = 'WHERE UserID = ''' + @UserID + ''''
SELECT @SQLString = @SQLString + ' an Cancelled = True'
SELECT @SelectList = @SelectList + ' ' + @SQLString
END
Help... What to do?
--Execute the SQL statement.
EXECUTE(@SELECTLIST)