Buena tarde estimados , solicitó de su gran poyo ya que soy novato en el tema , estoy ejecutando este query pero me sale un error en el sistema.
SUBSTRING(T0."NumAtCard",3,5) as "Factura Cliente", T0."DocNum" AS "Factura Proveedor", T0."DocDate", T0."CardCode" as "Codigo Proveedor", T0."CardName", T0."NumAtCard" as "Referencia Proveedor", T0."VatSum", T0."WTSum" AS "Total Retencion", T0."DocTotal", T1."WtLiable",T0."U_Factura1", T0."U_Factura2", T0."U_Factura3", T0."U_Factura4", T0."U_Factura5", T1."ItemCode", T1."Dscription", T1."Quantity", T1."Price", T1."Quantity"* T1."Price" as Total, T1."AcctCode", T1."OcrCode2", T1."OcrCode3", T1."OcrCode4", T1."OcrCode5", T0."U_No_Tarimas_entregadas", T0."U_Folio_de_Recibo", T0."DocDate" as "Fecha Factura", T0."U_Fecha_de_Entrega", T0."U_FECHAENTREGA", T0."U_Nombre_del_Conductor", T0."LicTradNum", T0."Comments", T0."U_Fecha_Embarque", T6."DocNum", T6."DocDate", T6."CardCode", T6."CardName", T6."DocTotal"/1.16 as "Subtotal" ,T6."DocTotal"/1.16*.16 as "IVA", T6."DocTotal" AS "Total Factura 1", T8."GroupName" as "AGRUPADOR"
FROM OPCH T0
INNER JOIN PCH1 T1 ON T0."DocEntry" = T1."DocEntry"
INNER JOIN OCRD T2 ON T0."CardCode" = T2."CardCode"
INNER JOIN OCRG T3 ON T2."GroupCode" = T3."GroupCode"
INNER JOIN OWHT T4 ON T2."WTCode" = T4."WTCode"
LEFT JOIN INV5 T5 ON T4."WTCode" = T5."WTCode"
INNER JOIN OINV T6 ON T0."U_Factura1" = T6."DocNum"
INNER JOIN OCRD T7 ON T6."CardCode" = T7."CardCode"
INNER JOIN OCRG T8 ON T7."GroupCode" = T8."GroupCode"
WHERE T0."DocDate" BETWEEN [%0] AND [%1] AND T1."AcctCode" LIKE '%631%' AND T0."CANCELED" LIKE '%N%' AND T0."NumAtCard" LIKE '%FT%' ORDER BY T0."DocNum",T1."AcctCode"
Este es el error que me arroja mi sistema ala hora de ejecutar.
1). [SAP AG][LIBODBCHDB32 DLL][HDBODBC32] General error;339 invalid number: [6930] attribute value is not a number;int [here]int ‘Valores definidos por usuario’ (CSHS) (string “U_Factura1”),U_Factura1 = ‘44663, 64’[string]; checkNull false
quedo atento de sus comentarios
saludos…