I have this SQL code:
SELECT t1.offname, t2.offname, t3.offname, t4.offname, t5.offname, t6.offname, t7.offname
FROM AS_ADDROBJ_29 t1
LEFT JOIN AS_ADDROBJ_29 t2 ON t1.parentguid = t2.aoguid AND t1.parentguid NOT NULL
LEFT JOIN AS_ADDROBJ_29 t3 ON t2.parentguid = t3.aoguid AND t2.parentguid NOT NULL
LEFT JOIN AS_ADDROBJ_29 t4 ON t3.parentguid = t4.aoguid AND t3.parentguid NOT NULL
LEFT JOIN AS_ADDROBJ_29 t5 ON t4.parentguid = t5.aoguid AND t4.parentguid NOT NULL
LEFT JOIN AS_ADDROBJ_29 t6 ON t5.parentguid = t6.aoguid AND t5.parentguid NOT NULL
LEFT JOIN AS_ADDROBJ_29 t7 ON t6.parentguid = t7.aoguid AND t6.parentguid NOT NULL
WHERE t1.offname LIKE "smth%"
When I execute this with SQLiteManager, it returns 7 columns with some of columns equals to null.
But AIR returns me only last t7 table result and other results are omitted. Different SQLColumnNameStyle-s not change the situation.
Any ideas?
There is a problem with joining the same table – in result you get lots of columns with same names. AIR sqlite engine can’t handle it properly, but there a simple hack: you just should name all columns with different string names. Like this:
Now in SQLResult.data you will have object with 7 “OFFNAME#” keys and all values. Some of values will be equled to null.