Brian,

Here is my SQL statement

CruisesQuery.SQLQuery = "SELECT T2CruiseName, T2Forest, T2District, T2Tract, T2Compartment FROM Cruises WHERE UPPER(" + theField + ") LIKE (" + likeThis + ") IN (SELECT T2CruiseName, T2Forest, T2District, T2Tract, T2Compartment FROM Cruises WHERE T2OwnerID = '" + App.OwnerID + "')"

I've checked the file and there are records to be fetched. The above statement returns nothing. I've flipped that SELECTS around, and still nothing. I've been looking at this so long that I probably don't see some simple syntax error. If I delete the embedded SELECT statement, then it works, except that it fetches all owners, and not just the one I want. TJH


On Jan 31, 2006, at 8:58 AM, Brian Seavers wrote:

Do you mean:

SELECT INVOICE_NO, INVOICE_TOTAL FROM INVOICES WHERE INV_CUST_ID IN (SELECT CUST_ID FROM CUSTOMERS WHERE CUST_PCODE='nnn');

then, SQLite supports it.

I have a need to use a nested SQL statement, via the IN verb. SQLite cannot handle nested SQL statements, so does anyone know of a workaround for this problem?

Thanks,    TJH

--
Kind regards

Brian

"A moment's insight is sometimes worth a lifetime's experience"
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to