JDeveloper - XSLT and the Query Database Function (oraext:query-database)
741931Dec 1 2010 — edited Dec 2 2010I'm trying to use the oraext:query-database function in an XSLT Map in JDeveloper. My goal is to make the sql query dynamic by referencing an xslt variable.
My stylesheet has the variable specified as follows: <xsl:variable name="var">ABT</xsl:variable>
If I test the map using a hardcoded value in the sql statement it works just fine:
"select r.forecasting_method_id from TableName.Task r where r.level4_code='ABT'"
But when I use the following statement:
"select r.forecasting_method_id from TableName.Task r where r.level4_code=$var"
I get the following error message:
oracle.xml.sql.OracleXMLSQLException: ORA-00911: invalid character
Can anyone provide any guidance on this?
Thanks.