Ok, I queried the original query to get only rows which had numeric values
for price, beds, baths... Then, I queried the new query.  I get the same
error.

<cfquery name="temp" dbtype="query">
select *
from  variables.listings.qResults
where price <> ''
  AND beds <> ''
  AND baths <> ''
</cfquery>

<cfquery name="qResults" dbtype="query">
select *
from  temp
where price between 1 AND 9999999
  AND beds >= 0
  AND baths >= 0
</cfquery>

-Brad
  -----Original Message-----
  From: Dave Watts [mailto:[EMAIL PROTECTED]
  Sent: Monday, April 05, 2004 10:50 AM
  To: CF-Talk
  Subject: RE: Query of Query Error

  > I get the following error:
  > Query Of Queries runtime error.
  > Unsupported type comparison.
  >
  > Here's my code:
  > ----------------------------------------
  > <cfquery name="qResults" dbtype="query">
  > select *
  > from variables.listings.qResults
  > where price between 1 AND 9999999
  > AND beds >= 0
  > AND baths >= 0
  > </cfquery>
  > ----------------------------------------
  >
  > The query I'm querying looks like this:
  > ----------------------------------------
  > street price beds baths
  > 123 Some Street 249900 3 2
  > 501 Another St. 189000 [empty string] [empty string]
  > 710 Third St. 95000 2 1
  > ----------------------------------------
  >
  > Would the empty strings have anything to do with it?

  I suspect that's the problem.

  > If so, is there a workaround?

  Try placing zeroes in there, when you build your original query.

  Dave Watts, CTO, Fig Leaf Software
  http://www.figleaf.com/
  phone: 202-797-5496
  fax: 202-797-5444
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to