Select
ContractVersionId
,Origin
XMLAGG(FIRSTSTATION || '/' ORDER BY FIRSTSTATION) AS InterTransptAndCarrCode
FROM LdCONTRACTMULTISEGMENT
WHERE firstsegair1='AC' AND secondsegair1 <> 'AC'
GROUP BY 1,2,SECONDSEGAIR1
XMLAGG is a Teradata function, you can't expect all these functions to work in snowflake as-is. But you're simply trying to get a group concat and snowflake supports the Standard SQL function for it:
LISTAGG(FIRSTSTATION, '/') WITHIN GROUP (ORDER BY FIRSTSTATION)
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more