Skip to Content
0

Help with a query - SAP B1 HANA

Jan 19 at 06:45 PM

97

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Nagarajan K Jan 19 at 11:45 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hello Nagarajan,

Thanks for the answer!
I tried that query, but i receive "(SWEI) error.

Thank you.

1