Suppose I have a simple SQL query:
select * from wmwhse21.itrn where adddate = 20191111
I want the user to be able to choose the database upon which to run the query at run-time. I've tried putting
select * from aa where adddate = 20191111 and aa = ?
i.e. placing a parameter marker in the FROM clause, but after keying in wmwhse21.itrn as aa in the BIRT report web viewer I get the error:
org.eclipse.birt.report.engine.api.EngineException: Cannot get the result set metadata. org.eclipse.birt.report.data.oda.jdbc.JDBCException: SQL statement does not return a ResultSet object. SQL error #1:ORA-00942: table or view does not exist ; java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
----
I understand that parameter markers are meant for WHERE clauses, but is it possible to use them in the FROM statement?
If not, how should I go about allowing users to key in the desired database to run the query against at run-time?
For reference, the database ID and database alias are different (e.g. "wmwhse21" is named Chicago Warehouse for instance, and you need to input the former to run the query), so I figure a choose-from-dropdown would work best for my users.