Discussion board where members can get started with QlikView.
I am trying to limit the number of records that I import in Edit Script by using a date variable.
One table has one record with a date field which I want to use as the variable . The other table has the records.
Table with date record:
SQL SELECT *
FROM live where Module = 'db';
The code with the variable is below:
From debtor_table where date >= 'variable';
Is it possible to link the variable to a value that is retrieved in earlier script from a different table?
I notice that there are some system variable names for dates - can I use them as the variable instead?
Go to Solution.
Yes, something like this for example. You will need to make sure that the variable gets the same date format as the date field in your second table has.
LET vDate = peek('date'); //pick the date value from the last record of table T1
From debtor_table where date >= '$(vDate)';
Instead of that u can change both fields as same date format(i.e 'YYYY-MM-DD') then keep as same name to both fields then give the association.
Perhaps, you can try something like this:
Load * Inline
where Date <$(datevariable);
I have used coding in Access before but QV is different.