I would like to be able to use CASE in the SELECT statement for DPQL.
I want the channel to display differently, i.e. instead of gateway.person, it will display as "user email" instead.
Example:
SELECT DPQL_COUNT(),
CASE
WHEN tickets.creation_system = 'gateway.agent' THEN 'agent email'
WHEN tickets.creation_system = 'gateway.person' THEN 'user email'
WHEN tickets.creation_system = 'web.agent.portal' THEN 'agent interface'
WHEN tickets.creation_system = 'web.person.portal' THEN 'user via portal'
ELSE 'Others'
END AS 'Channel'
FROM tickets
WHERE tickets.date_created = ${date}
GROUP BY tickets.creation_system
Přidat komentář
Please log in or register to submit a comment.