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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format of writing an append query in T-SQL

Status
Not open for further replies.

zishan619

Programmer
Joined
May 28, 2003
Messages
284
Location
MX
Hi:
What is the format of writing an append query in T-SQL with joing of four tables. Thank You
 
if you write a select statement to show the data, making sure it works and showing the fields you want appended. then add a line before the select line like so:

insert into #table name# (

and list all the field names you want the data to go to, in the order they are shown in the select statement, before closing the bracket.

if all the fields you are appending are all the fields in the table (ie a table with 5 columns, and you want to append into all 5 columns) simply type

insert into #table name# before the select. hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top