On Thu, 21 Oct 2004 10:06:05 +0800, James Holmes wrote:
Do a UNION in the QoQ instead of a join.
I thought the point was that he wanted not to do a UNION in SQL (still
not clear on why). I can't imagine doing a UNION in a QoQ would serve
a purpose better than just doing a UNION to begin with.
Thanks for everybody's input. I ended up with a cfc with three methods.
1-getQuery1
2-getQuery2
3-getBothQueries
This way I have access to either query one, OR query two, or both
combined. I guess I can't see a better way to do it.
On Thu, 21 Oct 2004 13:03:04 -0600, Scott Brady [EMAIL
What is the best way to add the results of 2 queries into one.
I want to check 2 different databases for login information. A union
query does work but I would like to use Cold Fusion to do it if
possible.
TIA,
--
David Mineer Jr
-
Don't wish it was easier; wish you were
Mind if i ask why? Seems to me a one-query union would be faster than
anything CF could do that would require TWO queries, on top of the extra CF
processing.
- Original Message -
From: David Mineer [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Wednesday, October 20, 2004 1:34 PM
look up query of query. If you have a query result named foo and
one named goo, you can use
cfquery name=foogoo dbtype=query
SELECT foo.username, goo.somecolumn
FROM foo, goo
WHERE foo.id = goo.id
/cfquery
Doug
On Wed, 20 Oct 2004 12:34:46 -0600, David Mineer [EMAIL PROTECTED]
On Wed, 20 Oct 2004 12:34:46 -0600, David Mineer [EMAIL PROTECTED] wrote:
What is the best way to add the results of 2 queries into one.
I want to check 2 different databases for login information. A union
query does work but I would like to use Cold Fusion to do it if
possible.
Look
Well, these two queries usually server two different purposes and I
need them combined only in this situation. There will be times where
I will want to use the two queries individually, so Instead of having
3 queries, each one individually plus the union I would rather just
have two and combine
Do a UNION in the QoQ instead of a join.
-Original Message-
From: David Mineer [mailto:[EMAIL PROTECTED]
Sent: Thursday, 21 October 2004 9:56
To: CF-Talk
Subject: Re: Add the results of one query to another
Well, these two queries usually server two different purposes and I need
them
In this case, perhaps:
cfquery name=foogoo dbtype=query
SELECT col1,
col2,
col3
FROM foo
UNION
SELECT col1,
col2,
col3
FROM goo
/cfquery
-Original Message-
From: Douglas Knudsen [mailto:[EMAIL PROTECTED]
Sent: Thursday, 21
9 matches
Mail list logo