Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Operand Type Clash Error

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)

;

Operand Type Clash Error.PNG

1 Solution

Accepted Solutions
prieper
Master II
Master II

Suggest to check the spelling of dates in your SQL-Table, may also be needed to be included in apostrophs.

View solution in original post

4 Replies
prieper
Master II
Master II

Suggest to check the spelling of dates in your SQL-Table, may also be needed to be included in apostrophs.

hari8088
Creator
Creator

Check the date format of both (i.e ASdate and variable).

In the where condition give like this

AsAtDate >= '$(vMaxDate)';

Chanty4u
MVP
MVP

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

Anonymous
Not applicable
Author

Hi Peter

Thank you.  It worked.  I added Apostrophe on the variable AsAtDate >= '$(vMaxDate)'  in the where clause.


Kind regards

Nayan