| |

VerySource

 Forgot password?
 Register
Search
View: 1187|Reply: 9

BCP import and export, the column order is wrong, the imported data is misaligned ??? Please help prawn

[Copy link]

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-20 18:00:02
| Show all posts |Read mode
I do this.
I first create an XML format file, then export the DAT data file, and then use the DAT with the XML file to import the same table name into another database, but the column order is different from the table in the source database.
It turned out that the imported data was misplaced.

What is going on>
Reply

Use magic Report

0

Threads

114

Posts

69.00

Credits

Newbie

Rank: 1

Credits
69.00

 China

Post time: 2020-1-29 20:00:01
| Show all posts
Does the data file have a NULL value ..
Reply

Use magic Report

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-2-1 13:36:01
| Show all posts
No NULL value and no default value.
Reply

Use magic Report

0

Threads

66

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 China

Post time: 2020-2-1 17:54:01
| Show all posts
Output in queryout mode, specifying the order of the fields
Reply

Use magic Report

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-2-5 20:30:01
| Show all posts
But what if you don't know the fields beforehand ???
Reply

Use magic Report

0

Threads

66

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 China

Post time: 2020-2-6 10:00:01
| Show all posts
When you create a table, the fields in the two tables must be created in the same order.
Reply

Use magic Report

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-2-7 19:45:01
| Show all posts
What if the table is already built and the order is different?
Reply

Use magic Report

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-2-17 07:30:01
| Show all posts
like
Reply

Use magic Report

0

Threads

114

Posts

69.00

Credits

Newbie

Rank: 1

Credits
69.00

 China

Post time: 2020-2-17 11:45:01
| Show all posts
Add a NULL field to correspond ~
Reply

Use magic Report

0

Threads

66

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 China

Post time: 2020-2-17 16:45:01
| Show all posts
New table-> Import data-> Delete old table-> Rename new table
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