Is there a way to store a value temporarily in DI inside a DF in a variable or something similar? Wish to pass the retireved sequence.next val (obtained through database stored proedure) to 2 tables, one after another.
Here is the scenario:
query1 -> Test Tbl (Transaction control - 1)
/
StgTbl --> Validation ------>
| \
| query2 -> Test Date Tbl (Transaction control - 2)
|
Exception table
Data must enter TEST table first and then into TEST_DATE table. But the PK column ‘test_id’ for TEST table also forms the part of the composite PK for TEST_DATE table. Hence the next value of sequence for the PK col ‘test_id’ must be used for the new row in both the tables.
I can retrive the next val in sequence using a database stored procedure. Now after retrieving, if i can store the value in some variable, then i can pass the same value to Test Date table.
Please pass me suggestions on how i should do this.
-------------------- Thanks for the help ------------------------
There is a problem with this solution that i am facing.
validation-->query1 --> TEST TABLE
|
--> query2 --> TEST DATE TABLE
validation has these columns:
col1
col2
col3
col4
now query 1 is mapped with TEST TABLE. and this table has just col1 and col2.
query2 is mapped with TEST_DATE table and this table has columns col1, col3 and col4.
i tried to add col1,col2,col3 and col4 to query1 so that i can use them in query2. But this gives me error - CANNOT FIND MATCHING NAME FOR SOURCE COLUMNS col3 AND col4 IN THE TARGET - TEST TABLE.