Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello. Posting below what I want to achieve:
daily_views:
load * from [daily_qvd];
let v_date = min(created_date);
// created_date is a column in the daily_qvd
transaction_views:
load * from [txn_qvd]
where txn_date = $(v_date);
I'm trying to take the date variable from the daily_views table and use it to subset rows in the transaction views table. The variable created using the let statement gives me 0 records.
Appreciate the help.
Try this
daily_views:
LOAD *
From [daily_qvd];
min_created_date:
LOAD Min(created_date) as min_created_date
Resident daily_views;
LET v_date = Peek('min_created_date');
TRADE $(v_date);
// created_date is a column in the daily_qvd
DROP Table min_created_date;
transaction_views:
LOAD *
From [txn_qvd]
Where txn_date = $(v_date);
Try this
daily_views:
LOAD *
From [daily_qvd];
min_created_date:
LOAD Min(created_date) as min_created_date
Resident daily_views;
LET v_date = Peek('min_created_date');
TRADE $(v_date);
// created_date is a column in the daily_qvd
DROP Table min_created_date;
transaction_views:
LOAD *
From [txn_qvd]
Where txn_date = $(v_date);