En Query Manager se ve bien, pero sacandolo de ahi aun crystal reports o aun consulta desde excel no te el formato de hora.
Gracias Christian, me funciono correcto. Dejo el código final por si alguien tuviera el mismo problema.
Esta consulta me da los pedidos facturados total, parcial y sin facturar.
SELECT T0.DocNum AS Pedido, T0.DocStatus AS Status, T0.DocDate AS Fecha, T0.CardCode AS Cliente, T0.CardName AS Nombre, T0.Max1099 - T0.Max1099 * 4 / 29 AS ‘Total antes de Iva’, T0.SlpCode AS Empleado,
T2.SlpName, T0.OwnerCode, T1.firstName, T0.UserSign, T3.USER_CODE,
case WHEN LEN(T0.[DocTime]) = ‘3’ THEN SUBSTRING (CAST(T0.[DocTime] AS VARCHAR(6)),1,1) + ‘:’ + SUBSTRING (CAST(T0.[DocTime] AS VARCHAR(6)),2,3)
WHEN LEN(T0.[DocTime]) = ‘4’ THEN SUBSTRING (CAST(T0.[DocTime] AS VARCHAR(6)),1,2) + ‘:’ + SUBSTRING (CAST(T0.[DocTime] AS VARCHAR(6)),3,4)
END ‘HORA DE CREACIÓN’,
(CASE WHEN T0.[DocStatus] = ‘O’ THEN (CASE
(SELECT SUM(Quantity - OpenQty)
FROM RDR1
WHERE RDR1.Docentry = T0.Docentry) WHEN 0 THEN ‘Sin Facturar’ ELSE ‘Facturado Parcial’ END) ELSE ‘Facturado’ END) AS Expr1
FROM dbo.ORDR AS T0 INNER JOIN
dbo.OHEM AS T1 ON T0.OwnerCode = T1.empID INNER JOIN
dbo.OSLP AS T2 ON T0.SlpCode = T2.SlpCode INNER JOIN
dbo.OUSR AS T3 ON T0.UserSign = T3.USERID