How do I copy records from a View to a table?
Q: I have a view which consists of many tables and functions and it has over 6 lacs records..Now I want all these records to be copied to one table…how can I do this? I have tried DTS and insert command also but it is taking so much time plz help if any way.
Bryan Oliver says: Look at the command Insert Into and Select Into commands oterwise you can use a cursor to move trough the records and append to another table.
Creates a new table and inserts the resulting rows from the query into it.
The user that executes a SELECT statement with the INTO clause must have CREATE TABLE permission in the destination database. SELECT…INTO cannot be used with COMPUTE.
Technorati Tags:
SQL Server, DTS, SQL, INSERT, cursors, queries
Tags: Programming