Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to limit the data loaded. It has to be limited by year.
I created this:
let $YearFrom = input('Year from', 'Specify the first reporting year required');
if (isnull($YearFrom)) then
let $YearFrom = 1999;
end if ;
which nicely creates the variable $YearFrom.
I want to use the result of this input box to limit the load
This does not work:
LOAD
applymap('Date_map_Billing', DATE) as Billing_Date,
Month(applymap('Date_map_Billing', DATE)) as Billing_Month,
Year(applymap('Date_map_Billing', DATE)) as Billing_Year;
SQL SELECT * FROM Billing where Billing_Year > $YearFrom;
I'm lost in the world of sql.
How can I correctly use the value from the variable in limiting the load?
Your help is much appreciated!!
Michiel try this
LOAD
applymap('Date_map_Billing', DATE) as Billing_Date,
Month(applymap('Date_map_Billing', DATE)) as Billing_Month,
Year(applymap('Date_map_Billing', DATE)) as Billing_Year;
SQL SELECT * FROM Billing where Billing_Year > $($YearFrom);
Talha
Michiel try this
LOAD
applymap('Date_map_Billing', DATE) as Billing_Date,
Month(applymap('Date_map_Billing', DATE)) as Billing_Month,
Year(applymap('Date_map_Billing', DATE)) as Billing_Year;
SQL SELECT * FROM Billing where Billing_Year > $($YearFrom);
Talha
SQL error: No value given for one or more required parameters.
Script line: SELECT * FROM txBilling where Billing_Year >2002
SQL SELECT * FROM txBilling where Billing_Year >2002
OK, this work. I get the error because the number formats aren't correctly defined.
Thanks Talha. Appreciate this very much!