Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] WF Maintain -- Is the Update command squirrely, or is it just me?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] WF Maintain -- Is the Update command squirrely, or is it just me?
 Login/Join
 
Virtuoso
posted
I sometimes get a "inserting duplicate key" error from my database when I use the MAINTAIN command update, like this --

reposition drug_benefit;
for 1 Update
DRUG_BENEFIT.drug_benefit.ES_ASSIGNED_USERID
DRUG_BENEFIT.drug_benefit.ES_ASSINGED_DT
DRUG_BENEFIT.drug_benefit.DRUG_PROGRAM_KEY
DRUG_BENEFIT.drug_benefit.DRUG_BENEFIT_START_DT
DRUG_BENEFIT.drug_benefit.DRUG_BENEFIT_END_DT
DRUG_BENEFIT.drug_benefit.BENEFIT_STATUS_KEY
DRUG_BENEFIT.drug_benefit.UPDATED_BY_USERID
DRUG_BENEFIT.drug_benefit.EFFECTIVE_START_DT
DRUG_BENEFIT.drug_benefit.EFFECTIVE_END_DT
from StkDrugBenefitEdit(1);


In some places in my code it works like a dream, in others I get a very dependable duplicate key error. Is there a super-secret trick to avoiding this odd behavior? Naturally I'll understand if you choose to send it to me via private message.

J.

This message has been edited. Last edited by: Kerry,



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Virtuoso
posted Hide Post
Huh. Maybe if the key is a character value? This may be a SQL Server problem.

J.



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Master
posted Hide Post
John - I can honestly say that I have never received that error when updating a database with Maintain.

Does the file contain key fields? Maintain does require one or more key fields in the file, listed at the top of the Master File Description.

If this file has a read-only, or auto-increment field (Fieldtype=R) then you have to take that into account when updating / including data.

If this is something you can repro at will, I would love to see the Master / access file.

Thanks
Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Virtuoso
posted Hide Post
I fixed it this time by having the DBA revise the key to an integer from a char. That may be the heart and soul of the issue, as SQL Server seems to have some real problems with character-based keys. Maintain may have just been returning the errors it was given by the dbms -- being a good soldier.

J.



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] WF Maintain -- Is the Update command squirrely, or is it just me?

Copyright © 1996-2020 Information Builders