array binding with 'IN' statement

George Parkinson george at microtherapy.ca
Wed Jul 25 13:32:12 CDT 2012


hello all,
i'm not sure what to make of this...

"SELECT * FROM t WHERE t.AgencyID in (996,998,1195)"
returns all records where AgencyID one of 996, 998, or 1195...no problem here.

now, let's say i have an array->    SqlBind(1) = "996,998,1195"
and i use this format ->        "SELECT * FROM t WHERE t.agencyid IN (:1)"

when i run:
db.SqlSelect(SQLQuery, kClientSide, kNoLocks, kForwardOnly, SQLBind)
only records where t.AgencyID = 996 are returned.

is this normal?
can't binding be used with "IN"?

thanks,
george
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macserve.net/pipermail/valentina/attachments/20120725/87f49dad/attachment.html>


More information about the Valentina mailing list