Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In the load script, is it possible to use a field in a table after it has been created? Can I use that I field and assign it to a variable using LET?
I think this would be better presented through an example...
trans:
SELECT tr_product,
tr_invoice,
tr_date as "cal_date"
FROM transactions;
LET vTDate = cal_date;
--- after this some other load stuff follows ---
I hope you get my problem. If there is a solution to this, could you please show me?
Appreciate your help!
I think you can with the use of the "Peek" function.
For example, in your table, something like:
LET vTDate = Peek('cal_date', 0, 'trans');
Would give you the oldest date of that table. If you want the newest, just switch the 0 parameter to -1.
Hope it helps
Hi,
Did you mean assign the whole field( with all the field values) to a variable? or just a field name?or first or last field value?