Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Does anyone know if you can use an arithmetic expression as part of a SQL SELECT statement using the SAP Connector and if so how do you construct the statement? When I try something like:
[tempdata]:
Load
*
;
SQL SELECT
MATNR, LFGJA*100 +LFMON
FROM MBEWH
WHERE BWKEY = 'XYZ'
AND LFGJA >= 2000
;
I get an "OpenStream failed. Key = SQL_ERROR ( Number:000) " error message.
Any suggestions would be most appreciated.
So, you can try :
[tempdata]:
Load
MATNR,
LFGJA*100 +LFMON
;
SQL SELECT
MATNR, LFGJA, LFMON
FROM MBEWH
WHERE BWKEY = 'XYZ'
AND LFGJA >= 2000
;
Martin
Hi,
Have you got a role in the system ?
Did you try loading another table from the SAP Connector.
Regards,
Martin
Hi Martin,
I can do basic table extracts no problem for example:
[tempdata]:
Load
*
;
SQL SELECT
MATNR, LFGJA, LFMON
FROM MBEWH
WHERE BWKEY = 'XYZ'
AND LFGJA >= 2000
;
This works fine. It is when I try to add an expression into the SELECT clause that I get the error.
So, you can try :
[tempdata]:
Load
MATNR,
LFGJA*100 +LFMON
;
SQL SELECT
MATNR, LFGJA, LFMON
FROM MBEWH
WHERE BWKEY = 'XYZ'
AND LFGJA >= 2000
;
Martin
I must be having a bad day - why didn't I think of that!
Many thanks.