Skip to Content
0
Jan 03, 2019 at 07:25 PM

Darle un formato

109 Views

Buenas tardes,

Por favor me informan si es posible colocar una mascara a una Columna en el Query manager de Sap Business One Hana. ejemplo E

Este es el query:


SELECT ('1150') ||
T0."TrsfrAcct" ||
T0."U_PLA_Viapago" ||
T3."DebPayAcct" ||
SUBSTRING (T0."CreateDate" ,9,2)||'/'||SUBSTRING (T0."CreateDate" ,6,2)||'/'||SUBSTRING (T0."CreateDate" ,1,4)||
SUBSTRING (T0."DocDate" ,9,2)||'/'||SUBSTRING (T0."DocDate" ,6,2)||'/'||SUBSTRING (T0."DocDate" ,1,4) as "TXT",
CAST(to_nvarchar(T1."SumApplied",'999999999999,99') as char) as "Valor",
CAST( Case WHEN T1."SumApplied" > 0 THEN '+' WHEN T1."SumApplied" > 0 THEN '-' end ||
CASE T0."DocCurr" WHEN '$' THEN 'COP' WHEN 'USD' THEN 'USD' END as CHAR) as "txt1",
SUBSTRING (T2."NumAtCard",1,16) As "Referencia",
SUBSTRING (T0."DocNum",1,10) as "Docmento",
SUBSTRING (T0."CardName", 1, 30) as "Proveedor- Cliente",
SUBSTRING (T4."USER_CODE" ,1,10) as "Usuario"
FROM OVPM T0 INNER JOIN VPM2 T1 ON T0."DocEntry" = T1."DocNum"
INNER JOIN OPCH T2 ON T1."baseAbs" = T2."DocEntry"
INNER JOIN OCRD T3 ON T2."CardCode" = T3."CardCode"
INNER JOIN OUSR T4 ON T0."UserSign" = T4."USERID"
WHERE T0."Canceled" <>'Y'

Necesito que la columna valor tenga el formato que le indico. puede ser nvarchar, varchar, char, pero al ejecutarlo me da error por no reconocer el formato que le indico.

Me pueden ayudar