943,972 Members | Top Members by Rank

Ad:
  • MS SQL Discussion Thread
  • Unsolved
  • Views: 5048
  • MS SQL RSS
Oct 19th, 2006
0

Identity Column Problem in MS SQL Server when moving data from using Bulk Copy

Expand Post »
Hi all,
God Bless U,
Thursday, October 19, 2006
first i am writing the my problem again......:!:

i am facing a problem in SQL Server. I am have a table given below..
------------------------------------------------
Table name is "A"
------------------------------------------------
1 Michle Administrator
2 John Consumer Finance Officer
3 Jackson Employer
4 Goeffery Empl0yer
------------------------------------------------
Here the identity column is the first one. Now if i delete the 2nd row the this table becomes like that
------------------------------------------------
Table name is "A"
------------------------------------------------
1 Michle Administrator
3 Jackson Employer
4 Goeffery Empl0yer
------------------------------------------------
Now i have an another table "B" having same structure (3 columns and first column is the identity column). Now if i move the all the data from table "A" to table "B" then the original seqeunce is distrubed the table "B" contains the data like this.

------------------------------------------------
Table name is "B"
------------------------------------------------
1 Michle Administrator
2 Jackson Employer
3 Goeffery Empl0yer
------------------------------------------------

but i need that what ever the first column is identity column but sequence of numbering must be same as the numbering in the table "A" to preserve the relationships.... like that...

------------------------------------------------
Table name is "B"
------------------------------------------------
1 Michle Administrator
3 Jackson Employer
4 Goeffery Empl0yer
------------------------------------------------

Notice:- I am moving data from Table "A" to Table "B" using Bulk Copy.... now what will be the solution in case of Bulk copy ...?

waiting for a good responce again from ur side. i will very thankful to you to solve my problem.
Thanks....
God Bless u By all means.:cheesy:
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
asifjavaid is offline Offline
40 posts
since Oct 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MS SQL Forum Timeline: Identity Column Problem in MS SQL Server
Next Thread in MS SQL Forum Timeline: Formatted Output in Stored Procedure





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC