Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 29, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Data & Imports Forums - SalesLogix Imports
Forum to discuss general SalesLogix import and data migration topics. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Imports | New ThreadView:  Search:  
 Author  Thread: Duplicate ID issue
Fernando Gonzalez
Posts: 2
 
Duplicate ID issueYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Aug 07 2:54 PM
Hello,

While running a DTS to import data from a view, I received several duplicate message errors while using the SalesLogix Loader Task in a DTS package. It occurred while loading the Contact Addresses into the Address table. The Loader Task generates ids but in this case it is generating ids that already exist. Is there anything that needs to be done with the SiteKeys table? Or is there something else? This is happening on a recently restored database. It is a copy of our production SalesLogix db.

Thanks.
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Duplicate ID issueYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Aug 07 9:39 PM
Fernando:

I had a quick discussion about this last night with someone else, but here is what's going on:

- The Loader generates the IDs sequentially starting from whichever point the SiteKeys is at
So, for instance, if the Sitekeys is set at 1 and you need 5 IDS, it will end up at 6 and you will get IDs 2 thru 6 for your records.

- The ID generation algorithim does not compare each generated ID against the DB, it just works in sequence, so lets say that for any reason whatsoever ID 3 and 4 already exist on the DB, then as the data is being written into the DB the Constraint from the Primary Key will prevent you from inserting the rows.


So, the question is not why the Task Loader is giving you the Duplicate IDs, but rather why are there IDs on the system that shouldn't have existed. One of the reasons why this may be is that someone manually created certain records and used IDs that they thought would never be used, and now you are dealing with the consequences.

How to fix it:
- For Each table involved, do a select a Max based on your site code

e.g. SELECT MAX(ADDRESSID) FROM ADDRESS WHERE ADDRESSID LIKE 'a6UJ9%'
The value that you retreive will be the highest ID that exist on the DB, now set the Sitekey row for the Address table to a value above the resulting ID.

Now you won't run into this problem (as long as no one is manually generating random IDs or using a failed external process to generate IDs)


[Reply][Quote]
Fernando Gonzalez
Posts: 2
 
Re: Duplicate ID issueYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Aug 07 2:20 PM
Thanks for the info. I thought it would be something like that.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/29/2024 9:08:14 AM