Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have a table in SQL server that has an identity column
I loaded its data and stored it in a qvd file
now I want to get the maximum identity value then save it in a variable and then use this variable in the where condition of a new reload to get new records to concatenate them with the qvd file
please help
Ali,
The Community Corner is for QlikCommunity-related questions. Please post in the Development or New to QlikView communities with questions about the product. I've moved this thread to Development.
I sounds like you are looking for just adding new records in your QVD file. If this is true, then you probabaly should do an incremental load and QlikView will add the new records.
Please see section "Using QVD files for incremental load" in the QlikView Reference manual.
Hi
I do not know if incremental load will solve it for you. I had a similar problem that I solved like this:
tTrain_Tmp:
Load *
From [tTrain_Tmp*.qvd] (qvd);
// Get latest date from read QVD files
tMaxDate_Tmp:
Load
Max(Date(LeaveDate)) as MaxLeaveDate
Resident tTrain_Tmp;
Let vTrainDate = Peek('MaxLeaveDate', 0);
Drop Table tMaxDate_Tmp;
// Get the next day
Let vTrainDate = '$(vTrainDate)' + '1';
The vTrainDate variable is used to control where to start next load of data.
It may not be very efficent to parse the table like this, but it works.