aaasam - Tuesday, December 13, 2011 2:46 PM:
I have a task whereby I need to obtain specific properties (columns) from a specific item-type (table) for a given set of properties (column values).
I have tried following the examples in the 9.3 Programmer Guide to no avail. So, here is what I am trying to achieve:
select sum(count(*)) as total, comp_type
from "AP_Customer_Complaint"
where comp_cat = "Package" and comp_type in "barcode, carton window, missing carton, missing date code, package size smaller, seal quality, serving size, volume, weights" and month = "november" and FY = 2011
group by comp_type
Hoping to get a result set that could look something like this:
comp_cat comp_type total
Package barcode 55
Package carton window 17
:
Package weights incorrect 3
Then, I need to query these property values out of the results set so I can build a Google chart API, for each reported "row" in the results set.
Key "notes" here.... everything is located in a single item-type (table), except for comp_type which is an item from "AP_Complaint_Type" item-type (table) AND comp_cat which is Foreign to comp_type in the AP_Complaint_Type item-type (table) as property "category".
aaasam - Tuesday, December 20, 2011 2:31 PM:
I have RESOLVED this issue using the following type of JS coding:
var innovator = this.getInnovator();
var results = inn.applySQL("select..., from...., where...., group by...., order by....");