You did not explain what the other tables are. But it seems you need to insert rows from multiple tables with the same structure.
insert into dbname.dbo.tablename
select * from tab1
union
select * from tab2
union
select * from tab3
union
select * from tab4
and so on ...
________________________________________________________________________________
If you do not like change, get out of the IT business...
yeah but i was just wondering what will be the sentext in SQL command, i have tried from importing it and it did work but still wanted to know how would i be able to query it.
You must write a query for each insert. You cannot write a single statment to insert into multiple tables. If you want to get the best answer for your question read faq183-874 and faq183-3179. Terry L. Broadbent - DBA
SQL Server Page:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.