Solved

Creating a Script to schedule a data dump from SQL Server 2005 to Access

Posted on 2009-04-15
4
541 Views
Last Modified: 2012-05-06
Hi there,
I have a db in SQL Server 2005 and would like to dump all the data from one table on to an Access db on the same computer. This job would be running twice, @ 8 AM/PM. What would be the best procedure to do this? Create a Job? Package in SSIS? I'm not that familiar with SSIS...
Also, the destination table has different field names than the source table, so mapping would probably come into play.
I'm a little comfortable with the insert statement, it's the scripting from SQL Server to Access is what I'm having trouble with...

Thanks for your input,
Classic
0
Comment
Question by:Classic1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 31

Accepted Solution

by:
RiteshShah earned 500 total points
ID: 24149486
you can create one linked server and create one job which will dump your data from SQL Server to linked access table. here is one example to create linked server with Access

http://www.sqlhub.com/2009/03/linked-server-in-sql-server-2005-from.html
0
 

Author Comment

by:Classic1
ID: 24150557
Hi there,
Thanks for the link, the sp_addlinkedserver worked well! I was able to execute a select statement within SQL...

Now is there a chance I can do an insert statement to the linked Access db? I tried doing this, but I got this error: (This was executed in the actual db, not in the master environment.

Msg 215, Level 16, State 1, Line 1
Parameters supplied for object 'AutoSolLink...AuditTrail' which is not a function. If the parameters are intended as a table hint, a WITH keyword is required.

I've attached the code as well..

Much appreciated,
Classic
Insert into [AutoSolLink]...AuditTrail ('Data1', 'Data2')
Select ADR.Reg_000, ADR.Reg_001
from MercuryAuditDRecords ADR

Open in new window

0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24150652
run this

Insert into [AutoSolLink]...AuditTrail (Data1, Data2)
Select ADR.Reg_000, ADR.Reg_001
from MercuryAuditDRecords ADR

Open in new window

0
 

Author Closing Comment

by:Classic1
ID: 31570480
Thank you very much! I was able to insert the data successfully...much appreciated,
Classic
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question