Skip to Content

Help with a query - SAP B1 HANA

Hello!

I'm trying to edit a query to get a variable condition, but, dont matter what i try, i always get:


"1). [SAP AG][LIBODBCHDB32 DLL][HDBODBC32] Syntax error or access violation;257 sql syntax error: incorrect syntax near "T0": line 8 col 6 '' (SWEI) (at pos 160)"

Original query (No error):

SELECT
T0."DocNum", T0."U_UPItmCod", T0."U_UPItmNam", T0."U_UPQtdPla", T0."U_UPDatFch", T0."U_UPWhsCod"

FROM
"SBO_HELSTEN_PROD"."@UPR_OWOR" T0

WHERE
T0."U_UPOPSbTy" = 'R'

"New" query:

SELECT
T0."DocNum", T0."U_UPItmCod", T0."U_UPItmNam", T0."U_UPQtdPla", T0."U_UPDatFch", T0."U_UPWhsCod"

FROM
"SBO_HELSTEN_PROD"."@UPR_OWOR" T0

WHERE
T0."U_UPOPSbTy" = 'R'
and T0."U_UPDatLan" =[%0]

How can i make that last sintax work?

Thanks!

PS: SAP B1 running on Hana, 9.2.
Field "U_UPDatLan" is "Date" type.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 19 at 11:45 PM

    Hi,

    Try this,

    SELECT
    T0."DocNum", T0."U_UPItmCod", T0."U_UPItmNam", T0."U_UPQtdPla", T0."U_UPDatFch", T0."U_UPWhsCod"

    FROM
    "SBO_HELSTEN_PROD"."@UPR_OWOR" T0

    WHERE
    T0."U_UPOPSbTy" = 'R'
    and T0."U_UPDatLan" = '[%0]'

    Regards,

    Nagarajan

    Add comment
    10|10000 characters needed characters exceeded