Skip to Content
0
Former Member
Nov 19, 2008 at 05:31 PM

variable table in SQL select

157 Views

Hello,

In various SQL versions it is possible to define a variable that will hold the name of the table and then use that variable in the FROM clause instead the actual table name.

something like this:

var_table(4) type c.

var_table = 'tab1'

select * from &var_table&... etc

var_table = 'tab2'

select * from &var_table&... etc

It is possible something like this in ABAP SQL?

Thank you.