Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (
- select xmlelement("agencias",
- xmlattributes('array' as "type"),
- xmlagg(
- xmlelement("arrayItem",
- xmlattributes('number' as "type"), numbertojson(ua.agencia_id))
- )
- )
- from (
- select *
- from sinergia.v$agencia_usuario ar
- where ar.excluido = 0
- ) ua
- where ua.usuario_id = u.usuario_id
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement