Query of queries would work, but it's not necessary.

SELECT bla, bla
FROM table1
UNION
SELECT bla, bla
FROM table2
ORDER BY date

The ORDER BY happens AFTER the UNION (not sure of that for SQL 2000, but
works in SQL 7, Access, Oracle 8i)

+-----------------------------------------------+
Bryan Love
  Macromedia Certified Professional
  Internet Application Developer
  Database Analyst
Telecommunication Systems
[EMAIL PROTECTED]
+-----------------------------------------------+

"...'If there must be trouble, let it be in my day, that my child may have
peace'..."
        - Thomas Paine, The American Crisis



-----Original Message-----
From: Alan Walker [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 14, 2002 9:44 AM
To: CF-Talk
Subject: Creating a new query from two existing queries and then sorting
the new query


Hello All,
 
I need to output a list of two event types coming from different tables
in a calendar format.  I have two queries getting each type.  I am
creating a new query with all the columns necessary to both event types
using QueryNew and then QueryAddRow and QuerySetCell.  I can get all the
data into the new query but I need to sort the new query by the date so
that both event types will appear correctly on the calendar.  Is there a
function that can do this?  What about Query of Queries in CF5, would
that do it?  We are running CF5 on Linux.
 
Thanks for any input.
 
Regards, 
Alan Walker
Technical Lead
V�rit� Multimedia, Inc.
http://www.verite.com
DVD * CD * Web * Print * Film * Sound
 


______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
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