There have been several requests for standardisation of the SQL used by GaianDB to query its logical tables..
There is in fact a very simple way of getting around the problem using Derby views, e.g.CREATE VIEW V_LT0 AS SELECT * FROM NEW com.ibm.db2j.GaianTable('LT0') TNow, the logical table 'LT0' can be queried through the view 'V_LT0', i.e. the following 2 statements are equivalent:
SELECT * FROM NEW com.ibm.db2j.GaianTable('LT0') T
SELECT * FROM V_LT0
.. The only drawback is that you need a separate view for every combination of arguments used in conjunction with the logical table, e.g, to have a result that includes all columns of the logical table and also columns describing where in the network the data came from:CREATE VIEW V_LT0_WITH_PROVENANCE AS SELECT * FROM NEW com.ibm.db2j.GaianTable('LT0', 'with_provenance') TThen:SELECT * FROM V_LT0_WITH_PROVENANCE WHERE GDB_NODE LIKE 'TEMPERATURE_SENSOR_HOST%'