Application Development and Automation 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: 
Read only

dynamic string concatenation in sql where clause

T0bbes
Explorer
0 Likes
2,409

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
Read only

0 Likes
1,898

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

Read only

0 Likes
1,898

Does not work as RHS but as LHS.

Read only

0 Likes
1,898
[...]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!