This one time, at band camp, Aditya Akella said: AA>How can I use NOT IN -- keyword with the SQL statement in Castor. I was able AA>to make it work with CALL SQL as it is a SQL statement. AA> AA>Here is a example CALL SQL Statement. AA> AA>CALL SQL SELECT * from CPT_CODE where code like '%A' and CPT_ID NOT IN AA>(SELECT CPT_ID FROM PROVIDER_CPT_PREFS WHERE PL_LOCATION_ID=1) AS AA>CptCodeJdo; AA> AA>I want to do something like this AA> AA>SELECT p FROM CptCodeJdo p where p.cptCode LIKE $1 and p.cptId NOT IN AA>(...........); AA> AA>I'm not able to use the NOT IN like this. Any code snippet would be very AA>helpful.
Aditya, See the JDO FAQ: http://www.castor.org/jdo-faq.html#OQL See the question, 'Does Castor support the SQL 'IN' expression?' So I'm guessing that the syntax for NOT IN would be: SELECT p FROM Product p WHERE p.id NOT IN LIST ( 123, 456, 789 ) I haven't tested this yet, so please let me know the outcome. Then I'll update the FAQ. Bruce -- perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");' ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev