I have a table containing many rows of SQL commands that make up a single SQL statement (for which I am grateful for this answer, step 5 here )
I followed the example in this answer and now have an SQL table - each row is an SQL row that builds the query. I can copy and paste the contents of this table into a new query window and get the results, however due to my lack of knowledge of SQL. I'm not sure how I'm going to copy the contents of the table into a string variable that I can execute.
Edit: The SQL statement in my table consists of 1 row per row of the ie statement
Row1: SELECT * FROM myTable Row2: WHERE Row3: col = @value
This statement, if copied to VARCHAR (MAX), exceeds the MAX limit.
I look forward to your answers. at the same time I will try myself.
thanks
sql-server tsql
Belliez
source share