Solved

query of queries

Posted on 2013-11-28
9
280 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 167 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 166 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 167 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
.php tree directory? 5 95
app server have enough resources... 2 66
Internal to DMZ IIS Authentication. 3 94
WebSite Direction 1 79
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

732 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