Skip to content

Tag: database-cursor

Invalid Column Name using Dynamic SQL

I am attempting to use Dynamic SQL for the 1st time – Now i understand the gist of it to an extent however attempting to enter a parameter into a temp table using Dynamic SQL i am getting the “Invalid Column name” when i am simply try to enter this as text not intending to be a column. On a

SQL Server – Cursor

I am trying to loop through a table using a cursor: That above returns taskResourceOID and EvUserOID. If I need to output a table with the @TaskOID and the respective taskResourceOID and EvUserOID, what is the best way to do it? Answer Use a temporary table or a table variable.. Or even better, don’t us…