Transform multiple records into a single line

Dúvidas, dicas e truques de PL/SQL. Aqui também vão assuntos relacionados a pacotes, triggers, funções, Java-Stored Procedures, etc
Post Reply
dudu0566
Rank: Analista Júnior
Rank: Analista Júnior
Posts: 74
Joined: Mon, 06 Aug 2007 3:59 pm
Location: Campinas - SP
Eduardo Gomes

Good morning,

I would like to know if it is possible to transform multiple records into a single line.

Explaining, I have the following Select:

Select all

  
pedido - etiqueta - campo - valor 
1 - 1           - A        - 99 
1 - 1           - B        - 88 
1 - 1           - C        - 77 
1 - 2           - A        - 12 
1 - 2           - B        - 23 
1 - 2           - C        - 34 
I would like grouping by labels, the "field" information, transform into several columns, so [

Detail: In some cases (depending on the label), the number of information (A, B, C) may vary, not in the same request (in the same request the structure will be The same), but so the solution would have to be generic to meet all situations.

grateful,
diegopedrao
Rank: Analista Sênior
Rank: Analista Sênior
Posts: 164
Joined: Fri, 22 Aug 2008 12:28 pm
Location: SP

Take a look at this link:

http://en.glufke.net/oracle/viewtopic.php?t=1003
Att,

Diego Monteiro
dudu0566
Rank: Analista Júnior
Rank: Analista Júnior
Posts: 74
Joined: Mon, 06 Aug 2007 3:59 pm
Location: Campinas - SP
Eduardo Gomes

Thanks diego ...
It's not exactly what I want, but it already helped ......

ABS
Post Reply
  • Information
  • Who is online

    Users browsing this forum: Bing [Bot] and 1 guest