How to implement the following functions:
Copy a table from the Access database to the SQL database on a regular basis every day.
The fields in the two tables are not exactly the same (name in access and name in SQL)
What's more, you can only copy qualified data (for example, only copy the list of students who have graduated )?
Step 1: Create a linked server.
Enterprise Manager -- Security -- Link server -- Right-click -- create link Server
Create a linked server to connect to the Access database, assuming the name is aa
Step 2: Start the SQL Agent service and set it to auto start
Step 3: Set the synchronized job
Enterprise Manager -- manage -- SQL Agent agent -- job -- Right-click -- create job
Enter the job name in general
Click new in the step, enter the step name, select tsql script as the type, and enter your update command in the command:
Insert into the database you want to update. DOB. the table you want to update (field Name List)
Select field name list from the table A, Aa... access table name to be updated
Where condition
OK.
In scheduling, how do you schedule your updates.
After confirmation, we are done.
Note: The SQL Agent agent service must be started. Otherwise, your job will not be executed.
The table that references access is linked to the server name...
There is no difference between other operations and local tables.
You can also use OpenRowSet () to open a specified table in access without creating a linked server.