No paty, no anda. lo resolvi con esta soluciòn de libras:
Código SQL:
Ver originalSELECT '2600' AS producto, 'TRANSPORTE NACIONAL DE CARGA'AS NOMBRE ,total1 AS valorunitario,total2 AS cantidad,undventa,iva,ordimp FROM(
SELECT nombre, SUM(valorunit) total1, SUM(cantidad) total2, undventa,iva,ordimp
FROM(
SELECT TB1.PRODUCTO,TB1.NOMBRE,TB1.VALORUNIT,TB1.CANTIDAD,TB1.UNDVENTA,TB1.IVA, 0 AS 'ORDIMP'
FROM MVTRADE AS TB1 JOIN MTMERCIA AS TB2 ON TB1.PRODUCTO = TB2.CODIGO
WHERE TB1.PRODUCTO IN ('2600','2600A') AND
TB1.ORIGEN = 'FAC' AND
TB1.TIPODCTO = 'FS' AND
TB1.NroDcto='7332'
GROUP BY PRODUCTO,NOMBRE,VALORUNIT,CANTIDAD,UNDVENTA,TB1.IVA
) AS t1
GROUP BY nombre, undventa,iva,ordimp
) AS t2