Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 needed query to move data....

Author  Topic 

raaj
Posting Yak Master

129 Posts

Posted - 2008-02-07 : 11:58:15
Hi Guys,
I am having a table in a database.....and i need to write a query to move tht table to microsoft access.......
so is tht possible with a query???

Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-07 : 12:07:23
You can use a DTS to do this.Add a connection to your database (source) and a connection to access (destination) and use transform data task.
Go to Top of Page

raaj
Posting Yak Master

129 Posts

Posted - 2008-02-07 : 12:12:06
thnx for ur reply.......
is thr a way i can get it in the form of query like INSERT INTO..SELECT...????bcoz i was said to write a query.......
Go to Top of Page

tprupsis
Yak Posting Veteran

88 Posts

Posted - 2008-02-07 : 12:48:32
Link the SQL Server table to your Access database. Then you can write an INSERT query to copy the data into a table in your Access db.
Go to Top of Page

raaj
Posting Yak Master

129 Posts

Posted - 2008-02-07 : 12:55:43
thnx man...
i am sorry to ask this but i have to ask....
how can i link the sql server table to access db ????
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-07 : 13:05:46
I think you can use OPENROWSET or linked server methods to achieve this.For adding as linked server, go to your server open linked server-> add linked server and choose the access db.
Go to Top of Page

tprupsis
Yak Posting Veteran

88 Posts

Posted - 2008-02-07 : 17:45:23
Actually, I may have misunderstood your question. I was thinking you were interested in a one-time data transfer. If so, just open up your Access database and link the SQL Server table from there. In Access 2003, you go to File > Get External Data > Link Tables. Then hook up to your SQL Server database, and select the table you want in Access. Then use the Access GUI to create a CREATE TABLE or INSERT query.

If you need to copy the table to Access repeatedly, then go the linked server or OPENROWSET route.
Go to Top of Page
   

- Advertisement -