I'm trying to load entries from a previously loaded table where they are only from the last 3 calendar years. I have created a variable in the wizard with the definition
=FirstSortedValue(Year, -Date) - 2
and the code in the load script is:
LastThreeYears:
LOAD OrderID,
Year
RESIDENT Orders
WHERE Year >= $(vStartYear);
and it gives me this error. Can someone help please?
Syntax error
Unexpected token: '=', expected one of: '(', 'ZTestw_z', 'OPERATOR_PLUS', 'OPERATOR_MINUS', 'not', 'bitnot', 'LITERAL_NUMBER', ...
LastThreeYears:
LOAD OrderID,
Year
RESIDENT Orders
WHERE Year >= >>>>>>=<<<<<<FirstSortedValue(Year, -Date) - 2
Hello!
As I can see your result Where-condition is:
Where Year >== FirstSortedValue(Year, - Date) - 2
Try to remove equal sign from your vStartYear variable definition.
If Sergey's post did the trick, could you please return to the thread and close things out by using the Accept as Solution button on his post for us? This gives him credit for the help and it lets other Members know it worked. If you did something different, consider posting that and then mark it after you post using the button.
Ah, I think I may have found the other issue, I think you may have done a SET instead of LET when you created the variable, which is I am going to post the Help links on those rather than try to explain things, but I think that could be the issue if Sergey's post did not work.
It is appreciated if you can be sure to close out your posts.
Regards,
Brett