Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 19th, 2005, 01:02 PM
RyanMcAdler RyanMcAdler is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Location: Rocklin, CA
Posts: 9 RyanMcAdler User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 3 m 18 sec
Reputation Power: 0
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Dynamic queries with Oracle 9i: Limitations?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway