I am trying to modify a select statement using a command object (the SQL statement), and a parameter to append to the table names.
All of the tables can be modified by a suffix to alter the select statement appropriately for different years data. I can set parameters for each of the tables (tedious), but am trying to set a way to use one parameter as a suffix to all the table names of interest.
The basic layout of the select is as follows :
Select a.field, b.field2, c.field
from table1 a, table2 b, table3 c
where a.field = b.field and b.field = c.field
I'd like to append a string suffix to table1 and table2 names such as
table1_p, table2_p
Any insight would be greatly appreciated
All of the tables can be modified by a suffix to alter the select statement appropriately for different years data. I can set parameters for each of the tables (tedious), but am trying to set a way to use one parameter as a suffix to all the table names of interest.
The basic layout of the select is as follows :
Select a.field, b.field2, c.field
from table1 a, table2 b, table3 c
where a.field = b.field and b.field = c.field
I'd like to append a string suffix to table1 and table2 names such as
table1_p, table2_p
Any insight would be greatly appreciated