https://netsuiteprofessionals.com logo
Title
n

NS

11/18/2021, 2:14 PM
Can you use CTEs with SuiteQL? Doesn't seem to work for me... is there any similar way to organize multiple select expressions within one query?
t

tdietrich

11/18/2021, 4:34 PM
@NS You can use the WITH clause. For example:
WITH ActiveEmployees AS
	(
		SELECT
			FirstName,
			LastName
		FROM 
			Employee 
		WHERE 
			IsInactive = 'F'
	)
SELECT
	FirstName,
	LastName
FROM
	ActiveEmployees
n

NS

11/18/2021, 4:44 PM
Thank you, that's what I was looking to do!