Combine multiple results into one row/cell
Best Answer
-
Is that your error message from the NetSuite SQL engine or connector?
Unfortunately I'm not familiar with how NetSuite has implemented SQL and a quick Google search doesn't reveal much, either.
Just to be sure, that GROUP_CONCAT function does have an option delimiter parameter, so you might try adding that (like GROUP_CONCAT(b.REGIONS,','). They might also call that function something slightly different, if it exists, like GROUPCONCAT().
An alternative would be to take it as-is into Domo and do a denormalization and then regular CONCAT() all those columns into one in a dataflow.
Aaron
MajorDomo @ Merit Medical
**Say "Thanks" by clicking the heart in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"1
Answers
-
There's a GROUP_CONCAT function in SQL that would do this well for you. I don't think the same exists in ETL in Domo.
Aaron
MajorDomo @ Merit Medical
**Say "Thanks" by clicking the heart in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0 -
Looks like GROUP_CONCAT isn't a recognized function on NetSuite's version of SQL. Thoughts?
SELECT
A. TRACKING_ID,
GROUP_CONCAT (b. REGIONS) as 'REGION'FROM TRACKING_REGIONS_MAP A
left join REGIONS b on a. TRACKING_ID = b. REGIONS_ID
GROUP BY
A. TRACKING_ID
All columns of the select list & order by should have set functions or be part of GROUP BY clause.[10136] 0 -
Is that your error message from the NetSuite SQL engine or connector?
Unfortunately I'm not familiar with how NetSuite has implemented SQL and a quick Google search doesn't reveal much, either.
Just to be sure, that GROUP_CONCAT function does have an option delimiter parameter, so you might try adding that (like GROUP_CONCAT(b.REGIONS,','). They might also call that function something slightly different, if it exists, like GROUPCONCAT().
An alternative would be to take it as-is into Domo and do a denormalization and then regular CONCAT() all those columns into one in a dataflow.
Aaron
MajorDomo @ Merit Medical
**Say "Thanks" by clicking the heart in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"1 -
The message came from the connector. I tried the various changes you mentioned, but no success. I'm trying it now in MySQL. the function GROUPBY_CONCAT seems to exist because it poopulates itself like a beastmode, but whenever I drop it in, i get: FUNCTION GROUPBY_CONCAT does not exist
I'll keep at it, but thanks for the help!
1 -
can someone from Domo look into this function GROUPBY_CONCAT and fix it soon? There're people already mentioned that this function did not work using Mysql methiond in Workflow creatio process in the thread. How come this is not yet being solved as it's a critical SQL aggregation function? I also got the error message - Unknown column 'GROUPBY_CONCAT' in 'field list' or 'GROUPBY_CONCAT' does not exist during my multiple attempts
0 -
This is my script and it did not work instead gave me error message saying function groupby_concat did not exsit.
SELECT `customers_id`, GROUPBY_CONCAT (`warehouse`)
FROM `orders`
GROUP BY `customers_id`;0 -
try this:
SELECT
`Customer Name`,
GROUP_CONCAT(`Customer States`) AS 'States'
FROM
`mb_test_Customer`group by `Customer Name`
1 -
continue this as example, how do I build further with this script as if to comma seperate customer states in one row, aggreated by customer name?
I would assume the current script would only work for 1 customer name assigned to 1 uniue state vs multiple states.
0 -
Like this?
Acme Coloardo Acme Idaho Acme California Acme New Mexico Acme New York result Acme Coloardo,Idaho,California,New Mexico,New York, 0 -
that's right. That would be what I would like to achieve. Any solution?
0 -
that's how I was able to do it MySql.
SELECT
`Customer Name`,
GROUP_CONCAT(`Customer States`) AS 'States'
FROM
`mb_test_Customer`group by `Customer Name`
2
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 755 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive