Re: load data from Access to SQL
From: Tom Moreau (tom_at_dont.spam.me.cips.ca)
Date: 08/31/04
- Next message: Sirish Saxena: "Re: Multiple-step - Field from 2 diff. Tbl are Non-Editable in VB"
- Previous message: Al Reid: "Re: load data from Access to SQL"
- In reply to: Al Reid: "Re: load data from Access to SQL"
- Next in thread: Paul Clement: "Re: load data from Access to SQL"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 31 Aug 2004 09:00:36 -0400
It's probably closer to:
INSERT INTO SQLtable
SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="YourAccessDB.mdb";User
ID=Admin;Password=;)...AccessTable
Note the extra dots before AccessTable.
--
Tom
---------------------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Al Reid" <areidjr@reidDASHhome.com> wrote in message
news:%23BxApg1jEHA.3056@TK2MSFTNGP10.phx.gbl...
"Andre" <no@spam.com> wrote in message
news:uBq392wjEHA.2908@TK2MSFTNGP10.phx.gbl...
> Al,
>
> If I can speak in simplistic terms, what I'd like to do is the following:
>
> insert SQLtable
> select * from AccessTable
>
> Is something like this possible without having to loop through every
record
> in my Access table? I'm at the point where I have the Access table in a
> recordset, but am unsure how do the Insert, without having to loop through
> every record.
>
> Thanks, Andre
>
>
Andre,
>From what you have provided, I don't know why DTS will not work for you,
but...
This MAY work for you. I have not tried or tested it.
INSERT INTO SQLtable
SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="YourAccessDB.mdb";User
ID=Admin;Password=;).AccessTable
For additional info look at the MSSQL BOL.
I hope this helps.
--
Al Reid
How will I know when I get there...
If I don't know where I'm going?
- Next message: Sirish Saxena: "Re: Multiple-step - Field from 2 diff. Tbl are Non-Editable in VB"
- Previous message: Al Reid: "Re: load data from Access to SQL"
- In reply to: Al Reid: "Re: load data from Access to SQL"
- Next in thread: Paul Clement: "Re: load data from Access to SQL"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|