Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Gurus,
How to define Combination of two fields as Primary Key In QVC Incremental Load
CALL Qvc.IncrementalSetup ('Orders', 'LastUpdate', 'Field1 & Field 2 ');
here field1 and Field2 combination is my Primary Key
any Help would be greatly appreciated.
Thanks,
Rajiv
Without knowing any details how this qvc-routine is implemented it should be look more in this way:
CALL Qvc.IncrementalSetup ('Orders', 'LastUpdate', 'Field1' & '|' & 'Field2');
- Marcus
Hi Marcus,
Thanks for your time.
Iam using QVC Script for My Oracle EBS incremental load.i have one table and here the Primary key is Combination of two fields. if i give CALL Qvc.IncrementalSetup ('Orders', 'LastUpdate', 'Field1' & '|' & 'Field2');
as you suggested its not taking.
Thanks,
Rajiv
It could be that's not possible in this way and you might need to create these key in beforehand. Maybe rwunderlich could help in this case.
- Marcus
Here is the Script
$(Include=<\\......\qvc_runtime\qvc.qvs>);
// The directory for the QVD file
SET Qvc.Loader.v.QvdDirectory='\\...\Qview\DEV\Incremental logic\QVD\';
// How far back to load if First Load
LET Qvc.Loader.v.BaseValue = num(MakeDate(2015,01,01));
// Datetime literal format for Excel - Shipper exercise
set Qvc.Loader.v.DatabaseDatetimeMask ='MM/DD/YYYY';
// Will the max Modfield value be stored with the QVD?
// The recommended value is True. This will greatly speed up subsequent loads.
SET Qvc.Loader.v.StoreMaxModFieldValue = -1;
CALL Qvc.Log('>>> Incremental Load with inserts & updates');
//set KeyField=(T_ID&'-'&I_ID);
// Calling parameters are Tablename, UpdateColumn, QVD_PrimaryKey.
CALL Qvc.IncrementalSetup ('Table','LAST_UPDATE_DATE', 'KeyField');
//*** If SQL, the CONNECT statement would go here ***
// Add SQL/LOAD statement here
[$(Qvc.Loader.v.Tablename)]:
load
*,
T_ID&'-'&I_ID as KeyField;
Directory;
// vTablename is set by the IncrementalSetup routine.
// Load script goes here. Be sure to include the WHERE condition below.
SELECT
*
FROM
Table WHERE $(Qvc.Loader.v.IncrementalExpression);
// IncrementalExpression is set up the Qvc.IncrementalSetup routine.
// Log the ending stats
Call Qvc.Log ('$(Qvc.Loader.v.Tablename) loaded, rows=' & num(NoOfRows('$(Qvc.Loader.v.Tablename)'), '#,##0'));
// Update the QVD with the changed rows
CALL Qvc.IncrementalStore
CALL Qvc.Cleanup;
CALL Qvc.RemoveEnvironmentVariables;
LET LOAD_DURATION=now(1) - SCRIPT_START;
Thanks,
Rajiv