I'm trying this but getting "unsupported search": ...
# suitescript
j
I'm trying this but getting "unsupported search":
Copy code
SELECT type, 

LISTAGG(custbody_transaction_type, ',') WITHIN GROUP (ORDER BY custbody_transaction_type) AS trans_types

FROM transaction tx

WHERE custbody_policy_number = 4000
AND type IN ('SalesOrd', 'RtnAuth')

GROUP BY type
c
It doesn't appear on the list of supported functions app.netsuite.com/app/help/helpcenter.nl?fid=section_158513731864.html
j
Any thoughts on another way to achieve this sort of thing? I have a grouped results, and need one column to be the list of values in the group for one of the columns.
c
Is this part of a larger query? Can you refactor to use search with
NS_CONCAT
? Can you output the detail rows and summarize in script logic?
j
I'm really hoping to do everything in one giant SQL query. And yes, it's giant.
message has been deleted
c
I don't see a supported function in SuiteQL that will concatenate / aggregate strings over result rows like you're looking for. There may be some other clever solution, but this is the point at which I would be reaching for different tool other than SuiteQL.