I got a table with approx 13066 records in which I want to add all other records from another table (having approx. 1346 records). There is a stored procedure which does the insert and I want to use it for all records to be inserted. Can anyone please help?
Share
I may have misinterpreted your question but it seems like that you want to execute a stored procedure and insert the results of the stored procedure in to your main table.
To do this you can do:
EDIT:
The only way I can think of doing this would be to use a cursor.
This assumes that your Stored Procedure accepts one parameter to select each row from Table2.
This isn’t the best use of SQL Server but if you really must do it this way then I can’t think of any other way.