Hi folks, do any one know a better alternative in...
# suitescript
x
Hi folks, do any one know a better alternative in SuiteQL for ns_concat in saved search. but ns_concat can do amazing job. however it doesnot seem to be supported in SuiteQL. Oracle ListAgg seems not be supported also. Thanks folks for any hints here.
t
@X Sun You can use "||" to concat two strings. Ex:
Copy code
SELECT
	ID,
	( LastName ||  ', ' || FirstName) AS FullName,
	Phone,
	Email
FROM
	Employee
WHERE
	Email LIKE '%@test.com'
ORDER BY
	LastName,
	FirstName
x
Thanks @tdietrich What I want is more than concat. I want to concat Multiple Rows into one Row, based on some Grouping. Like ns_concat in NetSuite saved search. BTW, your SuiteQL tool is really good, I love it.
like this. Base Data: 2 3 DEPTNO ENAME 4---------- ---------- 5 20 SMITH 6 30 ALLEN 7 30 WARD 8 20 JONES 9 30 MARTIN 10 30 BLAKE 11 10 CLARK 12 20 SCOTT 13 10 KING 14 30 TURNER 15 20 ADAMS 16 30 JAMES 17 20 FORD 18 10 MILLER 19 20Desired Output: 21 22 DEPTNO EMPLOYEES 23---------- -------------------------------------------------- 24 10 CLARK,KING,MILLER 25 20 SMITH,FORD,ADAMS,SCOTT,JONES 26 30 ALLEN,BLAKE,MARTIN,TURNER,JAMES,WARD