Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have one table called "GL Entry " i wanted to apply incremental logic on it and EntryNo has unique key.
Can anyone explain me how to apply incremental logic for Insert and update .
Thanks
if you have stored one time data into qvd then you can get Max(EntryNo) from that Qvd
MaxDate:
Load
Max(EntryNo) as LastUpdatedEntry
from......PreviouslyLoaded.qvd
(qvd);
Let vEntry = num(num#(peek('LastUpdatedEntry')));
OracleNewData:
Sql Select *
From ..Source
Where EntryNo > $(vEntry) ; // Here EntryNo format should match with the one with the Oracle EntryNo field
if you have stored one time data into qvd then you can get Max(EntryNo) from that Qvd
MaxDate:
Load
Max(EntryNo) as LastUpdatedEntry
from......PreviouslyLoaded.qvd
(qvd);
Let vEntry = num(num#(peek('LastUpdatedEntry')));
OracleNewData:
Sql Select *
From ..Source
Where EntryNo > $(vEntry) ; // Here EntryNo format should match with the one with the Oracle EntryNo field
I thing this logic useful for only insert how to apply logic for UPDATE
MaxDate:
Load
Max(EntryNo) as LastUpdatedEntry
from......PreviouslyLoaded.qvd
(qvd);
Let vEntry = num(num#(peek('LastUpdatedEntry')));
OracleNewData:
Sql Select *
From ..Source
Where EntryNo > $(vEntry) ;
Concatenate
Load *
From PreviouslyLoaded.qvd
Where not exists(EntryNo,EntryNo)
;
Store OracleNewData into PreviouslyLoadedQvd;