Skip to Content
avatar image
Former Member

Problema con parametros

Hola que tal,

Tengo un query que sin parametros funciona correctamente, pero a la hora de ponerselos, me marca errores sin sentido, ¿qué podría modificarle para que SAP lo reconozca? ya que directamente en SQL si funciona. Les dejo el query:

SELECT T0.U_CHOFERORIG, T1.Code, T1.U_INICIO, T1.U_TERM, T1.U_DIAS, SUM(T0.U_SUELDO) [Sueldo], T1.U_NOCOMP,

(ISNULL(T0.U_SUELDO,0)-ISNULL(T1.U_NOCOMP,0)) [Neto],

(ISNULL(T1.U_DIAS,0) * 9.61) [IMSS],

       (SUM(ISNULL(T0.U_SUELDO,0))*0.075) [ISPT],

        ISNULL(U_INFO,0) [Infonavit],

((ISNULL(T0.U_SUELDO,0)-ISNULL(T1.U_NOCOMP,0))-(ISNULL(T1.U_DIAS,0) * 9.61)-(SUM(ISNULL(T0.U_SUELDO,0))*0.075) - ISNULL(U_INFO,0)) [Total a pagar],

       ISNULL(T1.U_ANTIC,0) [Anticipo], ISNULL(T1.U_ADEUDO,0) [Adeudo], ISNULL(T1.U_NEXTEL,0) [Nextel],

      (((ISNULL(T0.U_SUELDO,0)-ISNULL(T1.U_NOCOMP,0))-(ISNULL(T1.U_DIAS,0) * 9.61)-(SUM(ISNULL(T0.U_SUELDO,0))*0.075) - ISNULL(U_INFO,0))

-ISNULL(T1.U_ANTIC,0) -ISNULL(T1.U_ADEUDO,0) - ISNULL(T1.U_NEXTEL,0)) [Saldo]

FROM

ORDR AS T0 INNER JOIN dbo.[@LIQ] AS T1 ON T0.U_LIQNUM = T1.Code

WHERE

t0.U_CHOFERORIG = [%0] AND T1.Code = [%1]

GROUP BY

T0.U_CHOFERORIG, T1.U_INICIO, T1.U_TERM, T1.U_DIAS, T1.U_NOCOMP, T0.U_SUELDO, T1.U_INFO,

T1.U_ANTIC, T1.U_ADEUDO, T1.U_NEXTEL, t1.Code

Saludos!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Aug 24, 2012 at 06:24 PM

    Que tal si cambias esta linea :

    ORDR AS T0 INNER JOIN dbo.[@LIQ] AS T1 ON T0.U_LIQNUM = T1.Code

     

    POR ESTA :

    ORDR T0 INNER JOIN dbo.[@LIQ] T1 ON T0.U_LIQNUM = T1.Code

    Saludos, me cuentas como te fue!

    Add comment
    10|10000 characters needed characters exceeded