Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have my table shown like this, and I want to show it horizontally with the help of extra columns
this is my table:


select	p.NombreCompleto	AS	Nombre,
		p.grado		        AS      Grado,
		p.paralelo	        AS      paralelo,
		SUM(cc.Valor)           AS      Valor

from persona p

		where p.NombreCompleto is not null
		and p.Valor != 0.00

		group by 
		    p.NombreCompleto, 
			p.grado, 
			p.paralelo




Nombre___grado______paralelo______efectivo

Angie____Séptimo________A____________100

Angie____Séptimo________A____________200


I want to show it this way:

Nombre_____grado______paralelo______efectivoA______efectivoB

Angie______Séptimo_________A______________100______________200

What I have tried:

I am using
SQL
group by
Posted
Updated 24-Sep-17 2:42am

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900