Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I created this variable on the script:
LET vLastSaturday = date(date#(weekstart(today()),'yyyy/mm/dd'),'yyyy-mm-dd');
Then on my data, I want to pull only sales that are before the variable date, so my where clause looks like this:
where cast( [POLICY_CREATE_DATE] as date) < $(vLastSaturday)
The original POLICY_CREATE_DATE format is datetime so I'm formating it to yyyy-mm-dd so that it's the same as my variable.
But when I reload the data, it gives me Operand type clash error. Please see attached screenshot and assist.
Thanks
You need quotes:
where cast( [POLICY_CREATE_DATE] as date) < '$(vLastSaturday)';
Thank you, your solution worked.
You need quotes:
where cast( [POLICY_CREATE_DATE] as date) < '$(vLastSaturday)';
Thank you, your solution worked.