‎2018 Oct 17 11:28 AM
Hi,
I'm writing an open sql query and I should use a string function in the JOIN/ON clause, but Hana Studio gives error.
The join should be like this:
LEFT OUTER JOIN T024 AS t3
ON RIGHT(t3~EKGRP,2) = t2~FRGC1
and the error is: "A Boolean expression is required in positions starting with RIGHT(T3~EKGRP."
If I try to use a concatenation operator I get another error:
LEFT OUTER JOIN T024 AS t3
ON t3~EKGRP like ('S' || t2~FRGC1)
the error is: "(" is invalid here (due to grammar). contains an invalid character or it is a
The strange thing is that both ways run well if I use the sql script inside a sql Client like DBeaver.
How can I arrange my join?
Is there a way to write standard sql inside an Abap program?
Or should I perform the join outside the open sql script?
Best regards
LK
‎2018 Oct 17 4:12 PM
you can use like in ON condition but the right side must be character, and as far as i know there is no character expression could do what you are trying to do...