| |

VerySource

 Forgot password?
 Register
Search
View: 1259|Reply: 8

DTS problem

[Copy link]

1

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-3-13 15:30:01
| Show all posts |Read mode
Database 1 has table A and database 2 also has table A. The two tables are exactly the same.

I now want to use DTS (no trigger, no coverage) to insert the data in table A of database 1 into table A of database 2, only insert different data, the same is not inserted, how to do it :)
Reply

Use magic Report

0

Threads

114

Posts

69.00

Credits

Newbie

Rank: 1

Credits
69.00

 China

Post time: 2020-6-9 14:45:01
| Show all posts
select * into b library: table
from a library: table
Reply

Use magic Report

0

Threads

126

Posts

73.00

Credits

Newbie

Rank: 1

Credits
73.00

 China

Post time: 2020-6-9 16:15:01
| Show all posts
It is recommended to first DTS to temporary table B, and then according to the data required by B INSERT
Reply

Use magic Report

0

Threads

114

Posts

69.00

Credits

Newbie

Rank: 1

Credits
69.00

 China

Post time: 2020-6-9 17:00:01
| Show all posts
select * into b library: table
from a library: table where not exists(select * from b library: table)
Reply

Use magic Report

1

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-6-9 17:45:02
| Show all posts
For example: database 1: table A; there are records 1,2,3
     Database 2: Table A; there are records 3, 4, 5, 6
After importing Table A of Database 1 into Table A of Database 2, the results obtained are: 1, 2, 3, 4, 5, 6
3 can not be repeated
Reply

Use magic Report

0

Threads

28

Posts

25.00

Credits

Newbie

Rank: 1

Credits
25.00

 China

Post time: 2020-6-9 19:30:02
| Show all posts
select * into b library: table
from a library: table a where a.id<> b library: table. id
Reply

Use magic Report

1

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-6-9 23:00:02
| Show all posts
Can you directly operate DTS without writing SQL statements?
Reply

Use magic Report

0

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-6-10 09:45:01
| Show all posts
This is obviously not suitable for DTS! ! ! , Insert ... select ... is more appropriate
Reply

Use magic Report

1

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-6-10 11:00:01
| Show all posts
Now whether he is suitable or not, I just want to know if it can be achieved
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list