Qlik Community

QlikView Connectors

r3iuk
Contributor

Arithmetic Expressions in SAP Connector SQL SELECT

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.

Tags (2)
1 Solution

Accepted Solutions
martin59
Valued Contributor II

Re. :Re: Re. :Arithmetic Expressions in SAP Connector SQL SELECT

So, you can try :

[tempdata]:
Load
MATNR,
LFGJA*100 +LFMON
;
SQL SELECT
MATNR, LFGJA, LFMON
FROM MBEWH
WHERE BWKEY = 'XYZ'
AND LFGJA >= 2000
;


Martin

4 Replies
martin59
Valued Contributor II

Re. :Arithmetic Expressions in SAP Connector SQL SELECT

Hi,

Have you got a role in the system ?

Did you try loading another table from the SAP Connector.

Regards,

Martin

r3iuk
Contributor

Re. :Arithmetic Expressions in SAP Connector SQL SELECT

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.

martin59
Valued Contributor II

Re. :Re: Re. :Arithmetic Expressions in SAP Connector SQL SELECT

So, you can try :

[tempdata]:
Load
MATNR,
LFGJA*100 +LFMON
;
SQL SELECT
MATNR, LFGJA, LFMON
FROM MBEWH
WHERE BWKEY = 'XYZ'
AND LFGJA >= 2000
;


Martin

r3iuk
Contributor

Re. :Re: Re. :Arithmetic Expressions in SAP Connector SQL SELECT

I must be having a bad day - why didn't I think of that!

Many thanks.

Community Browser