Posted: Wed Jun 25, 2003 12:14 pm Post subject: Incompatible operands for IN predicate
Centurion
Joined: 14 Mar 2002 Posts: 102
I'm constantly getting this error when trying to deploy flows where there is a SELECT blah WHERE blah IN (SELECT blah FROM blah)
Anyone else get this problem? I'm currently going through all my code to put the select in the brackets into a PASSTHRU statement, but I'm not sure it's going to work. Any ideas?
The syntax you are typing is abiguous to the human eye and therefore will be ambiguous to the ESQL syntax parser. When you type "SELECT blah WHERE blah IN (SELECT blah FROM blah) " then this can be read in one of the two following ways :
1) (SELECT ...) IN (SELECT ....) : returns a boolean
2) SELECT blah WHERE (blah IN (SELECT ... )) : attempts to return a list which is dependent on a value being in a different list.
I assume you are going for the second of these? In the ESQL IN, then the second operand is described as a List, but I do not believe it is possible to put a SELECT in as the second operand since this can returns either an Array, List, Row or Scalar variable.
In your array you mention that you are using PASSTHRU and therefore the contents of the PASSTHRU statement will be passed to the user database and the IN will not be processed as an ESQL IN but a database IN. Therefore you need to make sure that yor database supports the statement that you are trying to build up.
If you are still experiencing problems then it would be useful if you could append your actual ESQL PASSTHRU statement. _________________ Regards
Craig
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum