|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Dynamic queries with Oracle 9i: Limitations?
Hi all,
I've been programming Coldfusion for quite some time now and I've had much success with dynamic queries in the past however I'm running into issues using more advanced sql statements. I'm pretty sure that my SQL is solid; is there a limitation to using dynamic queries with Oracle 9i? (This might be to wrong place to ask such a question.) My query runs but I can't access the variables retrieved by the query (and it take 0ms to execute). Let me elaborate... Basically, I loop through a list to to build a where clause section of the query. I then insert the variable into a query containing more than just a simple select statement (but not anything too complex): <cfquery datasource="#rpt_datasource#" name="get_rpt"> ( (select * from customersrvs where comp_num in (select comp_num from customersrvs where #PreserveSingleQuotes(WhereClause)#0=0) )union (select * from customersrvs where #table_col2# = #search_value_sql2#) ) order by #col_sort_num# </cfquery> This query does run according to debugging but it takes 0ms to execute, suggesting that something is wrong here. To confirm my suspicions, I can't access any of the query's variables. I've also tried saving the entire SQL statement to a variable and then just trying: <cfquery datasource="#rpt_datasource#" name="get_rpt"> #PreserveSingleQuotes(sql_statement_variable)# </cfquery> This also doesn't work. When I copy the variable's contents directly into Oracle's ISQL+ work screen my query executes with no errors. Elsewhere on my sites less complicated dynamic queries run fine. Strange. So what's the deal with Coldfusion and Oracle 9i and dynamic queries? Is there some sort of limitation? On kind of a related note, I noticed <cfsavecontent> doesn't work when applied to this query (Oracle chokes on it). Is there a list of Coldfusion features that aren't supported in Oracle 9i somewhere? I've tried asking around in Macromedia's forums and searching documentation; I have yet to figure this out. Any ideas? Thanks in advance. |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Dynamic queries with Oracle 9i: Limitations? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|