Is it possible to use joins to build columns in a datagrid? I have a "sales" datagrid that has a column productID, I want the datagrid to display the name. My code looks like this:
Code: Select all
put sqlquery_createObject("sales") into theQueryA
sqlquery_set theQueryA, "related table joins", "LEFT OUTER JOIN customers, LEFT OUTER JOIN products"
sqlquery_set theQueryA, "order by", "sales.sales_ID"
sqlquery_retrieveAsRecords theQueryA, theDataA
put the result into theError
if theError is empty then
set the dgData of group "salesDataGrid" to theDataA
end if
if theError is not empty then
answer "Error populating customers:" && theError & "."
end if
Please help