View previous topic :: View next topic |
Author |
Message |
jsharon1248 Intermediate
Joined: 08 Aug 2007 Posts: 291 Topics: 2 Location: Chicago
|
Posted: Wed Jun 16, 2010 7:48 am Post subject: |
|
|
Follow dbz's advice. Bite the bullet and fix the problem. I'd recommend converting the random number column to an IDENTITY column. The added benefit of using an IDENTITY column is that you could consider using the LOAD utility. Yes, you'd need to unload, drop, recreate, and reload the table, but you'd fix the problem completely and eliminate all these round about work arounds. |
|
Back to top |
|
 |
warp5 Intermediate

Joined: 02 Dec 2002 Posts: 429 Topics: 18 Location: Germany
|
Posted: Wed Jun 16, 2010 10:31 am Post subject: |
|
|
How many records are in the table before you insert, what is the relationship between records already available and the number of records you are inserting? |
|
Back to top |
|
 |
geetha001 Beginner
Joined: 22 Jun 2005 Posts: 41 Topics: 14
|
Posted: Wed Jun 16, 2010 6:25 pm Post subject: |
|
|
I totally agree with jsharon1248 and dbz. Infact all the options available were reviewed and yes between random number and identity, identity key would be the best solution. But unfortunately, using identity at this point is too invasive and the impact is so huge (millions of records to be converted, other child table conversions etc.,) that people at my shop do not prefer to take that approach (sequencing). A workaround is what is being considered for now inspite of known difficulties.
Thank you all very much for all your inputs and I will post back the approach that will be taken.
Quote: |
How many records are in the table before you insert, what is the relationship between records already available and the number of records you are inserting?
|
There seems to be no relation to the records in the table and that being inserted, since the key is the ID number.
Thanks |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Wed Jun 16, 2010 8:14 pm Post subject: |
|
|
even with millions of records,
the tables could be converted to identity in 24 hours. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
warp5 Intermediate

Joined: 02 Dec 2002 Posts: 429 Topics: 18 Location: Germany
|
Posted: Thu Jun 17, 2010 3:47 am Post subject: |
|
|
geetha001, my question was to know if you really need to insert those records, or if a merge would be better, or ..... If you have very few records to start off with and you are inserting a larger number of records into that then maybe the whole process should be reviewed and perhaps a faster solution used. |
|
Back to top |
|
 |
|
|