Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [ABANDONED] Update in an Auto-Increment Key Table
Go
New
Search
Notify
Tools
Reply
  
[ABANDONED] Update in an Auto-Increment Key Table
 Login/Join
 
Master
posted
I have an auto-increment table that I'd like to write to in an insert/update fashion.

I have a Data Migrator flow that left-outer-joins the destination table to the source table, so that I can capture the ID of the destination table. I

I pass all my fields from the source table across, and I'm sending the ID field from the destination table as well, which is either an integer (on a match in the join) or a null (on no match in the join).

I can't figure out how to make this run as an insert/update flow. How do I get the database to either a) update the existing record when the keys match; or b) insert when there is no key?

If I try to assign the ID SQL*Server throws and error.* If I don't assign the ID I get duplicate inserts of the same information.

* 07/09/2019 16:20:39 MVGBIBITWF1 (FOC1377) UPDATE OR DELETE FOR KEYS=0 NOT SUPPORTED FOR SUFFIX : SQLMSS

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



 
Posts: 944 | Location: At the Mast | Registered: May 17, 2007Reply With QuoteReport This Post
Virtuoso
posted Hide Post
John

I found this old post on techsupport.. The Access File (filename.acx) determines read/write ability of the RDBMS.
KEYS=0 indicates read only, KEYS=1 indicates read/write.

Update the Master File (filename.mas) to include SEGTYPE=S0 and update the
Access File (filename.acx) to include KEYS=1 to allow to update the
table without these errors.

I think that the value for KEYS should be the number of fields at the beginning of the master file that make up the actual key fields. There is also a WRITE=YES that can be in the acx as well.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1694 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Master
posted Hide Post
Thank you sir!

It didn't work, largely because Access files are much more complicated than they used to be. I made the change and still got data crashing out on the insert of new records.

I redesigned the table to have a composite key and all works well. But I'll tell you what -- this is a BIG shortcoming in Data Migrator. This can be set up in SQL in about a dozen lines of code, Data Migrator can't seem to handle insert/update on a table with an auto-key.



 
Posts: 944 | Location: At the Mast | Registered: May 17, 2007Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Have you considered opening a case with IB Tech support to find out if this is possible?


WebFOCUS 8206, Unix, Windows
 
Posts: 1716 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Master
posted Hide Post
I'm a contractor that's paid by the hour, so I need to find a solution and move on to keep the customer happy. Rebuilding the table did the job so I'm good, but if someone else wants to present this I'll be interested in the result.



 
Posts: 944 | Location: At the Mast | Registered: May 17, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [ABANDONED] Update in an Auto-Increment Key Table

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.