0
I’m drawing up a report, where I take a person’s name, and what days they work. I was able to make that select, but I need it to stay that way:
[JOÃO - SEG/QUART] [MARIA - TERÇ/QUINT] [JOSÉ - SEG/TER/QUART]
I used (xmlagg), but it’s not working.
select DISTINCT
Substr(Obter_nome_medico(ag.CD_PESSOA_FISICA,'N'), 1, 100) nm_medico,
rtrim(xmlagg(xmlelement(e,substr(obter_valor_dominio(35,at.ie_dia_semana),1,1000),';').extract('//text()')),';')
from TABELA1 a, TABELA2 ag, TABELA3 at
where Substr(Obter_nome_medico(ag.CD_PESSOA_FISICA, 'N'), 1, 100) is not null
and a.cd_agenda = ag.CD_AGENDA
and ag.cd_agenda = at.cd_agenda
group by Substr(Obter_nome_medico(ag.CD_PESSOA_FISICA,'N'), 1, 100);
and how the return is now ?
– Rovann Linhalis
ORA-19011: Character string buffer is very small 19011. 00000 - "Character string buffer Too small" *Cause: The string result Asked for is Too big to Return back *Action: Get the result as a lob Instead
– Iago Camelo
you can [Edit] the question and add the necessary information. Apparently you are using Oracle ? if yes, add in tags
– Rovann Linhalis
oracle ? Tried using LISTAGG ? https://docs.oracle.com/cloud/latest/db112/SQLRF/functions089.htm#SQLRF30030
– Motta