Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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

1 Solution

Accepted Solutions
Sokkorn
Master
Master

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

View solution in original post

4 Replies
Gysbert_Wassenaar

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
Author

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
Master
Master

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
Author

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