Re: query of query question
Try a single quote! On Tuesday, September 17, 2002, at 05:57 AM, Smith, Daron [PA] wrote: > I get error: Can't find symbol: " __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: query of query question
Try single quotes. Collin Tobin QA Engineer 617 219 2000 [EMAIL PROTECTED] Macromedia® What the web can be.(tm) -Original Message- From: Smith, Daron [PA] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 17, 2002 8:58 AM To: CF-Talk Subject: query of query question I'm querying a search resultset and getting an error. It must be some kind of syntax thing but I don't see it. Does anyone see a problem with this query. The first query returns the following: CUSTOM1 CUSTOM2 KEY RECORDSSEARCHED SCORE SUMMARY April 2002 article 970 14210.7742 ... -10025 25 14210.7742 ... When I query this query result with the following I get error. select * from results where custom1 = "-100" I get error: Can't find symbol: " Without quotes I get: Error: April 2002 is not a number Thanks for any help. Daron J. Smith PSEA [EMAIL PROTECTED] PS does anyone know of a good Query of Queries reference? FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: query of query question
Are you using CFMX? I believe this issue relates to the fact that QofQ makes assumptions based on the data in the original query. In your data below - your first row in the column custom 1 has a data. Later on, you have a non date value. Therefore, when you QofQ against it - the system gets confused. All I can suggest is perhaps using another column to signify the non-date version of the custom1 column. === Raymond Camden, ColdFusion Jedi Master for Hire Email: [EMAIL PROTECTED] Yahoo IM : cfjedimaster "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: Smith, Daron [PA] [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 17, 2002 8:58 AM > To: CF-Talk > Subject: query of query question > > > I'm querying a search resultset and getting an error. It > must be some kind > of syntax thing but I don't see it. Does anyone see a > problem with this > query. > > The first query returns the following: > > CUSTOM1 CUSTOM2 KEY RECORDSSEARCHED SCORE > SUMMARY > April 2002article 970 14210.7742 > ... > -100 25 25 14210.7742 > ... > > When I query this query result with the following I get error. > > select * from results > where custom1 = "-100" > > I get error: Can't find symbol: " > > Without quotes I get: Error: April 2002 is not a number > > Thanks for any help. > > Daron J. Smith > PSEA > [EMAIL PROTECTED] > > PS does anyone know of a good Query of Queries reference? > > FAQ: http://www.thenetprofits.co.uk/coldfusion/faq > Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ > Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists > __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: query of query question
Daron - ignore my email - although it may still apply. Dick's a bit more awake than I am. ;) === Raymond Camden, ColdFusion Jedi Master for Hire Email: [EMAIL PROTECTED] Yahoo IM : cfjedimaster "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: Dick Applebaum [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 17, 2002 9:05 AM > To: CF-Talk > Subject: Re: query of query question > > > Try a single quote! > > On Tuesday, September 17, 2002, at 05:57 AM, Smith, Daron [PA] wrote: > > > I get error: Can't find symbol: " > > __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: query of query question
Quoting "Smith, Daron [PA]" <[EMAIL PROTECTED]>: > > The first query returns the following: > > CUSTOM1CUSTOM2 KEY RECORDSSEARCHED SCORE SUMMARY > April 2002 article 970 1421 0.7742 ... > -100 25251421 0.7742 ... What datatypes? > When I query this query result with the following I get error. > > select * from results > where custom1 = "-100" > > I get error: Can't find symbol: " In SQL, double quotes are identifying quotes. I don't think you have any field by the name "-100", do you? > Without quotes I get: Error: April 2002 is not a number How about using '-100' in the QoQ? If that fails, try explicitly casting the CUSTOM1 field to a VARCHAR and casting '-100' as well. > PS does anyone know of a good Query of Queries reference? The docs + an ANSI SQL reference will usually get you there. Jochem __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: query of query question
Are you using single or double quotes in your query? You should be using single quotes. eg. select * from results where custom1 = '-100' Stephen - Original Message - From: "Smith, Daron [PA]" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, September 17, 2002 1:57 PM Subject: query of query question > I'm querying a search resultset and getting an error. It must be some kind > of syntax thing but I don't see it. Does anyone see a problem with this > query. > > The first query returns the following: > > CUSTOM1 CUSTOM2 KEY RECORDSSEARCHED SCORE > SUMMARY > April 2002 article 970 1421 0.7742 ... > -100 25 25 1421 0.7742 ... > > When I query this query result with the following I get error. > > select * from results > where custom1 = "-100" > > I get error: Can't find symbol: " > > Without quotes I get: Error: April 2002 is not a number > > Thanks for any help. > > Daron J. Smith > PSEA > [EMAIL PROTECTED] > > PS does anyone know of a good Query of Queries reference? > > FAQ: http://www.thenetprofits.co.uk/coldfusion/faq > Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ > Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists > __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: query of query question
Quoting Raymond Camden <[EMAIL PROTECTED]>: > > Are you using CFMX? I believe this issue relates to the fact that > QofQ makes assumptions based on the data in the original query. In > your data below - your first row in the column custom 1 has a data. "April 2002" is not a date, it is a string. A date in SQL has the format -mm-dd. It can not even be the string representation of a date, because it only has a month and a year. BTW, why should CF MX make an assumption for that in the first place? Databases are strongly typed. Java is strongly typed. Unless that information is not returned through JDBC, CF MX only needs to make an assumption about the "-100", not about what is returned from the databse. Or am I misunderstanding something here? Jochem __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: query of query question
> Quoting Raymond Camden <[EMAIL PROTECTED]>: > > > > Are you using CFMX? I believe this issue relates to the fact that > > QofQ makes assumptions based on the data in the original query. In > > your data below - your first row in the column custom 1 has a data. > > "April 2002" is not a date, it is a string. A date in SQL has the > format -mm-dd. It can not even be the string representation of a > date, because it only has a month and a year. However - CFMX make assumptions based on the string. The following code shows how QofQ can assume April 2002 is a date and correctly query against it: col1col2 April 2002 ray May 2002camden January 2002foo select * fromtest where col1 < > BTW, why should CF MX make an assumption for that in the first place? > Databases are strongly typed. Java is strongly typed. Unless that > information is not returned through JDBC, CF MX only needs to make an > assumption about the "-100", not about what is returned from the > databse. Or am I misunderstanding something here? Let me check on this - I don't know if QofQ uses the metadata from the original query or not. Certainly for a 'man-made' query like te one above, it made the assumption that col1 was a data column. === Raymond Camden, ColdFusion Jedi Master for Hire Email: [EMAIL PROTECTED] Yahoo IM : cfjedimaster "My ally is the Force, and a powerful ally it is." - Yoda __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Query of query question
Kola, I am not using query of query like that, what I am doing is running successive queries against the first query as follows SELECT quantity, product, price quantity*price AS total_value FROM qfirstquery (FIRST QUERY) WHERE ProductID = #URL.productID# Put the query results into the session scope if you need to, not the query itself. This is how we are using it. Mike Brunt Sempra Energy 213.244.5226 "ASCII stupid question, get a stupid ANSI !" -Original Message- From: Kola Oyedeji [mailto:[EMAIL PROTECTED]] Sent: Friday, November 30, 2001 9:10 AM To: CF-Talk Subject: Query of query question Hi I have a query which is held in the session scope and when trying to query this query: I find I get an error if I scope the variable(I know its supposed to be locked)but not if I dont scope the variable: SELECT quantity FROM session.basket WHERE session.basket.ProductID = #URL.productID# unknown exception condition PCodeRuntimeContextImp::executeSQLTagCFQuery::endTag is this the way Qs of Qs are supposed to work? Thanks Kola Oyedeji |Web Developer |ekeda elthorne gate |64 high street |pinner |middx |ha55qa t +44(208)429 7333 f +44(208)429 7339 |www.ekeda.co.uk ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Query of query question
Well if this were to work, I would think you would need to make a modification or two (but I'm not saying it could work): SELECT quantity FROM session.basket WHERE ProductID = #var(URL.productID)# Jamie On Fri, 30 Nov 2001 17:09:47 -, in cf-talk you wrote: >Hi > >I have a query which is held in the session scope >and when trying to query this query: > >I find I get an error if I scope the variable(I know its supposed to be >locked)but not if I dont scope the variable: > > >SELECT > quantity >FROM > session.basket >WHERE > session.basket.ProductID = #URL.productID# > > >unknown exception condition > >PCodeRuntimeContextImp::executeSQLTagCFQuery::endTag > >is this the way Qs of Qs are supposed to work? > >Thanks > >Kola Oyedeji |Web Developer |ekeda >elthorne gate |64 high street |pinner |middx |ha55qa >t +44(208)429 7333 f +44(208)429 7339 |www.ekeda.co.uk > > ~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Query of query question
Well it works but only if you dont scope the session var. I havent used cf5 much so I just wondered if this was how it was supposed to work Kola -Original Message- From: Jamie Jackson [mailto:[EMAIL PROTECTED]] Sent: Friday, November 30, 2001 7:40 PM To: CF-Talk Subject: Re: Query of query question Well if this were to work, I would think you would need to make a modification or two (but I'm not saying it could work): SELECT quantity FROM session.basket WHERE ProductID = #var(URL.productID)# Jamie On Fri, 30 Nov 2001 17:09:47 -, in cf-talk you wrote: >Hi > >I have a query which is held in the session scope >and when trying to query this query: > >I find I get an error if I scope the variable(I know its supposed to be >locked)but not if I dont scope the variable: > > >SELECT > quantity >FROM > session.basket >WHERE > session.basket.ProductID = #URL.productID# > > >unknown exception condition > >PCodeRuntimeContextImp::executeSQLTagCFQuery::endTag > >is this the way Qs of Qs are supposed to work? > >Thanks > >Kola Oyedeji |Web Developer |ekeda >elthorne gate |64 high street |pinner |middx |ha55qa >t +44(208)429 7333 f +44(208)429 7339 |www.ekeda.co.uk > > ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Query of query question
Sparrow-Hood, Walter wrote: > I know I can add rows but is it possible to delete a record from a query > using QofQ. Just select all the records except the one you want to delete. Jochem -- Who needs virtual reality if you can just dream? - Loesje [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Query of query question
Just use a WHERE clause in your QofQ, and you can effectively delete rows. -Original Message- From: Sparrow-Hood, Walter [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 12, 2003 1:03 PM To: CF-Talk Subject: Query of query question I know I can add rows but is it possible to delete a record from a query using QofQ. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Query of query question
Duh - it's been a long day - thanks. -Original Message- From: Jochem van Dieten [SMTP:[EMAIL PROTECTED] Sent: Wednesday, November 12, 2003 4:15 PM To: CF-Talk Subject: Re: Query of query question Sparrow-Hood, Walter wrote: > I know I can add rows but is it possible to delete a record from a query > using QofQ. Just select all the records except the one you want to delete. Jochem -- Who needs virtual reality if you can just dream? - Loesje [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Query of query question
Do you mean delete it from the database, or exclude it from the results? If you just want to exclude it, you could use a WHERE to eliminate it from your new results. -Original Message- From: Sparrow-Hood, Walter [mailto:[EMAIL PROTECTED] Sent: November 12, 2003 3:03 PM To: CF-Talk Subject: Query of query question I know I can add rows but is it possible to delete a record from a query using QofQ. _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: query of query question
damn, I posted before I could get the rest in, I get this error, Error Executing Database Query. Query Of Queries runtime error. Unsupported type comparison. Is this possible, or is there a work around, for example does hal helms query sim tag support this. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: query of query question
Is vehicleid field an integer or a varchar? If it's integer, you don't need the single quotes. WHERE vehicleid in (165,564) From: John mccosker [mailto:[EMAIL PROTECTED] Sent: Monday, October 11, 2004 11:35 AM To: CF-Talk Subject: Re: query of query question damn, I posted before I could get the rest in, I get this error, Error Executing Database Query. Query Of Queries runtime error. Unsupported type comparison. Is this possible, or is there a work around, for example does hal helms query sim tag support this. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: query of query question MORE INFO
Single quote returns the same thing, April 2000 is not a number (meant to include in original msg, double quotes was just a WAG). The original query is a cfsearch resultset so . I'm using CF5 so does the assumptions thing with MX still apply? Is there a way that I can tell it to assume that custom1 is a string? Thanks for the help, Daron J. Smith PSEA [EMAIL PROTECTED] FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists