Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

query of queries

Posted on 2013-11-28
9
Medium Priority
?
284 Views
Last Modified: 2013-12-12
I have a query of queries , now Under certain conditions I need to remove the record from the QoQ to keep the static query up to date. I know that QoQ has some limitations and does not support delete. Is there a way I can remove a record from the static query
0
Comment
Question by:erikTsomik
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 50

Expert Comment

by:Lowfatspread
ID: 39683569
why can you just exclude it in the subsequent where conditions?
0
 
LVL 19

Author Comment

by:erikTsomik
ID: 39683634
well just because I am building the query on the fly. Basically passing the query by reference to another function  and updating the query as needed (updating meaning deleting records)
0
 
LVL 50

Assisted Solution

by:Lowfatspread
Lowfatspread earned 668 total points
ID: 39683863
have you checked out this article?

http://www.bennadel.com/blog/1707-Running-UPDATE-And-DELETE-SQL-Statements-Using-ColdFusion-Query-Of-Queries.htm

I didn't get to the end of it but it seemed to be going along your lines of thought...

I'm just not sure how additive and complex your requirements are going to get....

the whole purpose of the qoq is to give you a "static" result set upon which to identify/analyse further subsets/ explorations .... once you physically start DELETING/ UPDATTING data that usually the time to rebase the data...

good luck
0
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 
LVL 19

Author Comment

by:erikTsomik
ID: 39684102
I checked the ban nadel site and it requires the custom tag to be installed , I was hoping if somebody can route me to more elegant way
0
 
LVL 39

Assisted Solution

by:gdemaria
gdemaria earned 664 total points
ID: 39684233
I don't think it's clear what you're trying to do.   You have a query, then you base a query of query on that query... now you want to run the QofQ again and limit the records?   This is all within one request/post to the server.   So, you need three different versions of the query, the main one, the QofQ and then a filtered down QofQ?

You have to keep in mind that QofQ is NOT faster than hitting the database again, you could just perform another query to the database.

You could also filter it by using a CFIF statement in the output loop, so you just skip over the records you don't want.

I think you need to give us some code for a more specific answer.
0
 
LVL 16

Expert Comment

by:Gurpreet Singh Randhawa
ID: 39684756
Can you some code, so we can see and guide you properly
0
 
LVL 19

Author Comment

by:erikTsomik
ID: 39686913
I understand that QoQ is not the fastest way to do things But I am building my recordset based on the result of the multiple queries, and compile into 1 recordset . And this all happened in the cfc and I am not sure that I can call a custom tag in the CFC itself.

What I am thinking I need to declare a java Array that will be always available to me , because I can simply remove an item from the array and then loop over the array and build the static query.

Correct me if I am wrong
0
 
LVL 39

Expert Comment

by:gdemaria
ID: 39687040
If you need to maintain a list of these items between requests (between page views) then I think the best bet is absolutely the data base.   It will be the fastest and more efficient way of managing lists.   You can mark them off as you want them removed and then just query the ones that are not marked (or vise versa).   For clean-up, you can simply go through and delete the lists nightly if they are still around or you can delete them onSessionEnd
0
 
LVL 52

Accepted Solution

by:
_agx_ earned 668 total points
ID: 39689042
> it requires the custom tag to be installed

Yeah, but if you look at it, ultimately all it's doing is running a QoQ to simulate a DELETE. Given that QoQ's don't support deletes,  why is it you can't just do what he's doing? ie Run a QoQ to exclude the records and use the new resultset ?
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question