Skip to Content
0

dynamic string concatenation in sql where clause

Dec 15, 2017 at 10:22 AM

56

avatar image

Is it possible to combine two variables from a select in a subselect?

Example:

select tplnr from table1 as a where ( exists ( select * from table2 where key = @sy-mandt+a~tplnr)).

Focus:

@sy-mandt+a~tplnr

Thanks!

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

1 Answer

Horst Keller
Dec 15, 2017 at 10:32 AM
0
Show 3 Share
10 |10000 characters needed characters left characters exceeded

This function does not working wihtin the "where" expression. I can't compile it.

0

Does not work as RHS but as LHS.

0
[...]select addrnumber from adrv where concat( 'test1', 'test2' ) = p~appl_key [....]<br>

This leads to the following error message: ( is gramatically not allowed here...

Okay.. we are using 7.4 not 7.5... sorry. Thanks!

0