Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

inserting multiple values in multiple value?

Status
Not open for further replies.

nowayout

Programmer
Feb 25, 2003
364
US
Hi all

I want to insert multiple valuse from query command as follow

insert into dbname.dbo.tablename

select * from (all the tables or multiple tables)


how would i show to select from all the table or selecting from multiple table at a time.

Thanks,,,
 
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...
 
oh ok i am sorry for that

i would really like to insert in to

insert into multiple or all the table name

select * from all the table from different database
 
Hi,

I think u r looking to import data from one Database to another, use Import/Export Wizard(Data transformation services DTS) to do that.


hope it helps....


Sunil
 
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.

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top