Solved

query of queries

Posted on 2013-11-28
9
279 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

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…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
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:
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

756 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