Skip to Content

dynamic string concatenation in sql where clause

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!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Dec 15, 2017 at 10:32 AM
    Add comment
    10|10000 characters needed characters exceeded

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