![]() |
![]() |
![]() |
![]() |
![]() |
FTP | ![]() |
![]() |
CCD | ![]() |
![]() |
Buscar | ![]() |
![]() |
Trucos | ![]() |
![]() |
Trabajo | ![]() |
![]() |
Foros | ![]() |
#1
|
||||
|
||||
![]() Buenas a tod@s
tengo una tabla en SQL de la siguente estructura: CODIGO ____FECHA _____DIA _____TOTAL ______8 ___30/10/04 ____LUNES _______1000 _____10 ___30/10/04 ____LUNES ________500 _____15 ___30/10/04 ____LUNES ________400 ______8 ___31/10/04 ____MARTES ______900 _____10 ___31/10/04 ____MARTES ______600 _____15 ___31/10/04 -___MARTES _____1000 y quiero transformarla : CODIGO ___LUNES ___MARTES ______8 _____1000 ________900 _____10 ______500 ________600 _____15 ______400 _______1000 ****************************************** TRANSFORM SUM(total) AS Sumatotals SELECT codigo FROM venta WHERE Fecha >= #30 / 10 / 04 # AND Fecha <= #31 / 10 / 04 # GROUP BY codigo PIVOT DIA; he tratado de hacerlo pero Delphi da un error: line 1 Incorrect Sintax near 'total' que Estoy haciendo mal ?? ![]() ![]() ![]() Última edición por vtdeleon fecha: 30-11-2004 a las 12:41:04. |
|
|
![]() |
|