Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to use a sequence generator

Status
Not open for further replies.

vikind

MIS
Dec 11, 2003
58
US
In a mapping i have two target tables. I want a sequence key to be populated in both the target tables.

when i try to create two links for output port for nextval to two different targets my session fails.

can anybody tell me can i populate the sequence keys in both the target tables in a single mapping

i have one more constraint the value of SEQ_KEY should be same for all the records..ie..if i run Mapping_1
the value of SEQ_KEY should be 1 for all the rows. similarly if i run any other mapping say Mapping_2( which also uses target table 2)
after Mapping_1 is run
the value of seq key should be 2 so on..


Target 1 :

SEQ_KEY | FNAME | LNAME | ...

Target 2:

SEQ_KEY
 
Sorry, but why use a sequence generator in the first place if the value stays constant??????

Simple create a supporting table that stores a counter and increment this value by means of a lookup on itself with value 1. Now use this to write to the desired target...

T. Blom
Information analyst
tbl@shimano-eu.com
 
I really don't understand your problem... If possible rephrase your question to give some meaningful feedback/suggestions...

Sri
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top