I have a DataSource which access three database tables. Two of the tables have columns which have the same name. Obviously the following is ambiguous and does not work but illustrate the problem
On a lark, which I know is wrong, I tried the following which created a valid SQL select but the resulting Map in the DSRequest records did not contain an "ARTICLES as T_ARTICLES" or a "T_ARTICLES" Map.Entry.
Other than creating a go-between-view for the TOP30 table is there a way to specify an "AS" in the field XML or the 'operationBindings' definition.
Here is my 'operationBindings' XML
Am using the Power Edition's FilterBuilder component to create an wonderfully flexible, user-driven table.
Would also be willing to fetch the TOP30 values from within my DMI, but am not sure how to execute and additional SQL queries from inside there. However, this would be useful to know in some cases.
Code:
<field type="integer" name="ARTICLES" tableName="ALL" hidden="true"/> <field type="integer" name="ARTICLES" tableName="TOP30" hidden="true"/>
On a lark, which I know is wrong, I tried the following which created a valid SQL select but the resulting Map in the DSRequest records did not contain an "ARTICLES as T_ARTICLES" or a "T_ARTICLES" Map.Entry.
Code:
<field type="integer" name="ARTICLES" tableName="ALL" hidden="true"/> <field type="integer" name="ARTICLES as T_ARTICLES" tableName="TOP30" hidden="true"/>
Here is my 'operationBindings' XML
Code:
<operationBindings> <operationBinding operationType="fetch"> <tableClause>MAIN, ALL, TOP30</tableClause> <whereClause> MAIN.ALL_ID = ALL.ID AND MAIN.TOP30_ID = TOP30.ID AND ($defaultWhereClause)</whereClause> </operationBinding> </operationBindings>
Would also be willing to fetch the TOP30 values from within my DMI, but am not sure how to execute and additional SQL queries from inside there. However, this would be useful to know in some cases.
Comment