Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:You know, I have written some queries with very complicated sub-queries that worked just fine, so I have doubts that you can't do it. Post your queries and maybe someone could give it a shot. Other options are putting it into a stored procedure, and since you are using Oracle, there is LOTS that you can do with PL/SQL, trust me. The least desireable option would be to loop through the output of the first query to drive the second withing ColdFusion. 2000 database hits on your page is not very efficient.
I can't just stick the first query into the second query to make it work. The first query is more complicated than the example I gave so that's why I have to break them up.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:That would be the obvious method. I only posted a sub-query example because the OP said that the query was complex.
Why don't you just join the tables in your query?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:I think what everyone has been trying to say without saying it directly is no unless you try some sort of gymnastics using Q-of-Q.
is there another tag or CF fucntion that will accomplish the same task that I don't know about?
Copy link to clipboard
Copied
quote:
Originally posted by: paross1
quote:I think what everyone has been trying to say without saying it directly is no unless you try some sort of gymnastics using Q-of-Q.
is there another tag or CF fucntion that will accomplish the same task that I don't know about?
Phil
Copy link to clipboard
Copied
quote:
Originally posted by: paross1
quote:I think what everyone has been trying to say without saying it directly is no unless you try some sort of gymnastics using Q-of-Q.
is there another tag or CF fucntion that will accomplish the same task that I don't know about?
Phil
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:A six table join is not particularly unusual or "complex". One of the problems here is that you are not displaying exactly what you are dealing with, but just 'examples" which handicaps anyone attempting to help or offer suggestions. Now that you have posted what you are trying to accomplish, why don't you post some of your actual code, especially your SQL, since what may seem complicated to you might be fairly simple to some of the folks that read this forum.
Keep in mind that the two queries I gave were only examples of what I was trying to do. The getStudentCourses query already uses 6 tables.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more