Execute Immediate syntax..
Posted on 2006-11-07
Hope to get the solution for the below from expert asap..
SET @query = @query + ' FROM DBO.' + @sTable + ' WHERE ' + @sTable +'.ComponentId = ' + CONVERT(CHAR, @id);
EXECUTE IMMEDIATE @query;
Whats wrong with the above syntax, which i am trying to implement inside my cursor. I am getting error as:
Cannot add rows to sysdepends for the current stored procedure because it depends on the missing object 'IMMEDIATE'. The stored procedure will still be created.
Awaiting to hear your support on this asap.
Thanks in advance.
~ HNS ~