Result displayed in array

Dúvidas, dicas e truques de SQL, Select, Update, Delete, cláusulas, operações com joins, Funções em SQLs, etc
  

Poston Mon, 16 Jun 2008 3:20 pm

Hello guys, I have a question I hope you can help: I have the following query: select nom_user_inclusao, nom_user_atualizacao, decode (tp_evolucao_mailing, ' U ', ' Update ', ' I ', ' Insertion ', null) Tipo_Evolucao, count (tp_evolucao_mailing) from scp_evolucao_mailing group by nom_user_inclusao, nom_user_atualizacao, decode (tp_evolucao_mailing, ' U ', ' Update ', ' I ', ' Insertion ', null);



the results of this query is: USR_INCLUSAO USR_ATUALIZACAO TIPO_EVOLUCAO COUNT Update SCP 668 SCP Insertion the insertion RMOLIVEIRA 29 3 I wanted to display as an array, something like this: USER INSERTION COUNT 3668671 SCP RMOLIVEIRA UPDATE 29 29 does anyone know if it is possible via sql this view?

I thank you
eduardo
Location: sp

Sempre há algo a aprender....

Poston Fri, 27 Jun 2008 7:48 am

Hello, Edward.

See if this helps: select decode (tp_evolucao_mailing, ' U ', nom_usr_atualizacao, ' I ', nom_usr_inclusao, null) user, sum (decode (tp_evolucao_mailing, ' I ', ' U ' .0 .1, null)) INSERTION, sum (decode (tp_evolucao_mailing, ' U ', ' I ' .0 .1, null)) CHANGES, count (tp_evolucao_mailing) COUNT from scp_evolucao_mailing group by decode (tp_evolucao_mailing, ' U ', nom_usr_atualizacao, ' I ', nom_usr_inclusao, null) Hug.
marcio.adao
Location: Descalvado

Poston Fri, 27 Jun 2008 10:43 am

I don't quite understand but try to use the RPAD function (if it is to put everything right under each topic)
ricardorauber
Location: Canoas RS



Return to SQL

Who is online

Users browsing this forum: No registered users and 4 guests