Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following Script (sourced from the forums) as an example:
Let ThisExecTime = ReloadTime();
QV_Table:
SQL SELECT PrimaryKey, X, Y FROM DB_TABLE
WHERE ModificationTime >= #$(LastExecTime)#
AND ModificationTime < #$(ThisExecTime)#;
Concatenate LOAD PrimaryKey, X, Y FROM File.QVD
WHERE NOT EXISTS(PrimaryKey);
Inner Join SQL SELECT PrimaryKey FROM DB_TABLE;
If ScriptErrorCount = 0 then
STORE QV_Table INTO File.QVD;
Let LastExecTime = ThisExecTime;
End If
My question is now: What if my PrimaryKey is 2 columns? How would I be able to do that? We have 4 financial databases that could have invoice numbers that are the same across all 4, when I load my data into the data warehouse, I include the name of where it's from in a seperate column.
I'd like to do an incremental update now as the records updates. The code doing this to the data warehouse is already done, and I'm busy with the QVW now, but would need to work with two "PrimaryKey"'s if at all possible.
any help would be appreciated!
Create a composite key in the form key1&'-'&key2 AS compositekey.
This format can also be used in the where exists() clause.
Jonathan
Create a composite key in the form key1&'-'&key2 AS compositekey.
This format can also be used in the where exists() clause.
Jonathan