This content has been marked as final. Show 2 replies
Hello! I have a load script that works but I use a hard-coded date (highlighted in red below). But I want to use an arbitrary date value, vStartDate, instead of the hard-coded date. How can I use the value of vStartDate?
LET vStartDate = makedate(Year(Today()),01,01);
SQL SELECT t3.item,
sum(t1.units) as ytd_units,
sum(t1.total_cost) as ytd_cost,
sum(t1.total_price) as ytd_price
FROM transitem t1, trans t2, product t3
where t1.trn_uid = t2.trn_uid
and t1.product_uid = t3.product_uid
and t2.trn_date > '2011-01-01'
group by t3.item;