Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic string concatenation in sql where clause

tobiasfue
Explorer
0 Kudos

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!

4 REPLIES 4

0 Kudos

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

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

Does not work as RHS but as LHS.

0 Kudos
[...]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!