Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Where... IN returning an error

Hello,

Can anyone help with the reason why I'm getting the error message:

"

SQL##f - SqlState: 37000, ErrorCode: 8258, ErrorMsg: [Jade Software Corporation][JADE ODBC Server] Expecting: 'comparison operator'; found 'IN' at 60

SQL SELECT *

FROM HRLeaveRequest

WHERE myHRLeaveRequestStatus IN('02162.0000000600','02162.0000000601','02162.0000000604')

"

When I run the following script:

LOAD

       calculatedDays,
     calculatedHours,
     dateFrom,
     dateTo,
     enteredLeave,
     approvalLastAction,
     myHRPerson,
     myHRTransTypePay as TransType,
     cancelReason,
     myHRLeaveRequestStatus
;

    

SQL SELECT *

FROM Table_Name

WHERE myHRLeaveRequestStatus IN('02162.0000000600','02162.0000000601','02162.0000000604');

Regards

Tags (1)
1 Solution

Accepted Solutions
Sokkorn
Honored Contributor

Re: Where... IN returning an error

Hi Cristina,

Have you try this one yet:

LOAD

     calculatedDays,

     calculatedHours,

     dateFrom,

     dateTo,

     enteredLeave,

     approvalLastAction,

     myHRPerson,

     myHRTransTypePay as TransType,

     cancelReason,

     myHRLeaveRequestStatus Where Match(myHRLeaveRequestStatus,'02162.0000000600','02162.0000000601','02162.0000000604');

SQL SELECT *

FROM Table_Name;

Regards,

Sokkorn

4 Replies

Re: Where... IN returning an error

Make sure there's a space between IN and ('02162.000....

If that does not work check that Jade (and/or its odbc driver) supports the where in ... syntax


talk is cheap, supply exceeds demand
Not applicable

Re: Where... IN returning an error

Thank you both,

I think it is a problem with Jade not accepting the where in... syntax.

I've just used a AND instead.

Thanks again.

Cristina

Sokkorn
Honored Contributor

Re: Where... IN returning an error

Hi Cristina,

Have you try this one yet:

LOAD

     calculatedDays,

     calculatedHours,

     dateFrom,

     dateTo,

     enteredLeave,

     approvalLastAction,

     myHRPerson,

     myHRTransTypePay as TransType,

     cancelReason,

     myHRLeaveRequestStatus Where Match(myHRLeaveRequestStatus,'02162.0000000600','02162.0000000601','02162.0000000604');

SQL SELECT *

FROM Table_Name;

Regards,

Sokkorn

Not applicable

Re: Where... IN returning an error

Thank you Sokkorn,

I have just tested it and it works. Although I've sorted it out with an AND which is working as other conditions have to be met, it will be very useful in other scripts I need to set up for quering data in Jade.

thanks

fcrysss

Community Browser