Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I need assistance with an Operand Type Clash Error. Basically, I have a script where data should only load for the maximum date. Below is the script and the error message.
Please can you assist as to why i get this error and how to rectify it.
TMP:
LOAD
max(AsAtDate) as MaxAsAtDate;
SQL SELECT *
FROM "Procurement_ODS".dbo."Business_Unit_Table";
Let vMaxDate = Date(peek('MaxAsAtDate',0,'TMP'),'YYYY/MM/DD');
drop table TMP;
LOAD BusinessUnitId as SEGMENT2,
BusinessUnitName,
SegmentID,
SegmentName,
AsAtDate,
SegmentNameNew,
SegmentIDNew,
Brand,
"BBBEE_IND";
SQL SELECT *
FROM "Procurement_ODS".dbo."Business_Unit_Table"
where SegmentNameNew <> '%global%' and BusinessUnitId <> '6270' and BusinessUnitId <> '8430' and AsAtDate >= $(vMaxDate)
;
Suggest to check the spelling of dates in your SQL-Table, may also be needed to be included in apostrophs.
Suggest to check the spelling of dates in your SQL-Table, may also be needed to be included in apostrophs.
Check the date format of both (i.e ASdate and variable).
In the where condition give like this
AsAtDate >= '$(vMaxDate)';
try to debug the application to know where exactly it is stopping you.
by that you can identify the issue easily.
and chek the variable missing single quotes i believe
Hi Peter
Thank you. It worked. I added Apostrophe on the variable AsAtDate >= '$(vMaxDate)' in the where clause.
Kind regards
Nayan