insert syntax

  • Thread starter Thread starter jt
  • Start date Start date
J

jt

i want to do an insert into tTable1 that is based on data
in tTable2 - basically i want to copy all the data from
Table1 into Table2 - what is the best way to do this.

thanks

jt

something like:

insert into tTable2 values(select field1, field2 from
tTable1)
 
Hi,

Use an Append Query:

- Select create new query in design view
- In the Show Table dialog box select only the Source table "tTable2"
- Select the fields you want to add into the the Destination table "tTable1"
- Select the menu option Query > Append Query and for table to Append to
select the table "tTable1"

I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Eric Butts
Microsoft Access Support

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."


--------------------
| Content-Class: urn:content-classes:message
| From: "jt" <[email protected]>
| Sender: "jt" <[email protected]>
| Subject: insert syntax
| Date: Wed, 4 Feb 2004 11:06:19 -0800
| Lines: 12
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcPrUfiFGUYoboRZTke6gmVstZ7xFA==
| Newsgroups: microsoft.public.access.modulesdaovba
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.access.modulesdaovba:123491
| NNTP-Posting-Host: tk2msftngxa13.phx.gbl 10.40.1.165
| X-Tomcat-NG: microsoft.public.access.modulesdaovba
|
| i want to do an insert into tTable1 that is based on data
| in tTable2 - basically i want to copy all the data from
| Table1 into Table2 - what is the best way to do this.
|
| thanks
|
| jt
|
| something like:
|
| insert into tTable2 values(select field1, field2 from
| tTable1)
|
 
i want to do an insert into tTable1 that is based on data
in tTable2 - basically i want to copy all the data from
Table1 into Table2 - what is the best way to do this.

thanks

jt

something like:

insert into tTable2 values(select field1, field2 from
tTable1)

Almost there:

INSERT INTO tTable2
SELECT field1, field2 FROM tTable1;

This is an alternative to the Values() operand, which applies when you
want to insert literal text or numbers into a single record.
 
Back
Top