NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
2 replies Latest Post - 2013-02-18T14:24:44Z by JBrennan
Pinned topic Executing a dynamic SQL query with a < symbol
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
I am trying to run some dynamic queries generated from a xslt against a Oracle database. I can do this until I introduce a < sign in the query. I have the query externalized to a XML file right now and I get it via the document() function within my XSLT. I wrapped the query in CDATA in the XML and used the < escaped less than. All looks good. When I look in the probe, the query looks right with a < sign. Because DataPower wraps the query in XML, this becomes ivalid on the Oracle side. Oracle returns "ORA-00920: invalid relational operator". I cannot seem to get this escaped in the actual query that DP generates in the XML. If I hard code this query with the < sign in a static SQL action it works fine. Any ideas on how to introduce < in a dynamic query in XSLT? I tried disabling output escaping, wrapping the actual query in CDATA on the outbound side, etc. Any help is appreciated.
Updated on 2013-02-18T14:24:44Z at 2013-02-18T14:24:44Z by JBrennan
SystemAdmin 110000D4XK6772 Posts
JBrennan 270003M2T277 PostsACCEPTED ANSWER
Re: Executing a dynamic SQL query with a < symbol2013-02-18T14:24:44Z in response to SystemAdminYour post may have been converting escaped characters here. I see you suggesting to use < instead of < which is the same thig. If you had typed "ampersand lt semicolon" then I already tried that. DataPower, much like your post, converts that back to < when it writes the query to XML before it sends it out. That then becomes invalid XML again. I think if I can get DP to wirte the escape sequence instead of the < then I would be fine. I have not found any way of doing that.