I don't know about the Query a Query feature in ColdFusion 5, but every
RDBMS that I'm familiar with will let you specify two separate WHERE
clauses. There wouldn't be much point in a UNION statement if not. Perhaps
you are thinking about the SELECT clause which must have the same number of
fields with the same names and of the same datatypes?

Benjamin S. Rogers
http://www.c4.net/
v.508.240.0051
f.508.240.0057

-----Original Message-----
From: Ken Monroe [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 01, 2001 10:47 AM
To: CF-Talk
Subject: Re: Concatenate 2 Queries


The problem I'm having if I use a UNION is that the queries use 2 different
WHERE clauses.  What  I need to do is:

SELECT Fields
FROM Table
WHERE Cond1
UNION
SELECT Fields
FROM Table
Where Cond2

My understanding is I can only use the WHERE clause after the last SELECT
block...

----- Original Message -----
From: "Philip Arnold - ASP" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, August 01, 2001 10:38 AM
Subject: RE: Concatenate 2 Queries


> > Is there a way to combine (concatenate) 2 different queries
> > *without* using
> > the QueryNew, QueryAddRow, QuerySetCell stuff?  Something like
> > QueryCat(Query1, Query2). ??
>
> I'm not sure if Query a Query does this, but how about using UNION?
>
> Philip Arnold
> Director
> Certified ColdFusion Developer
> ASP Multimedia Limited
> T: +44 (0)20 8680 1133
>
> "Websites for the real world"
>
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
> **********************************************************************
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to