it depends on how you want it....

if you want them consecutively, you probably want to UNION two queries together, but 
you need to make sure that the column types are identical...

i.e.

select meeting_name as event_name, meet_date as event_date
from meetings
where meet_date >= curdate()
union
select train_name as event_name, train_date as event_date
from trainings
where train_date >= curdate()
order by event_date

> -----Original Message-----
> From: Tony Thomas [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 16, 2003 9:01 AM
> To: [EMAIL PROTECTED]
> Subject: select data from two tables without join
> 
> 
> I have two tables that are similar, but not related. One is for 
> meetings and the other for training. I'd like to run a query 
> to select 
> data from both based on the date so I can display the 
> information on a 
> web page. Is that possible? It seems unnecessary to run a separate 
> query for each. I'd like to do something like this:
> 
> SELECT * FROM meetings, trainings
> WHERE (meet_date >= CURDATE()) AND (train_date >= CURDATE())
> ORDER BY meet_date DESC, train_date DESC;
> 
> But this doesn't work. Is something like this possible?
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    
> http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to