Faqts : Business : Databases : MySQL

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

10 of 13 people (77%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

I need to match the max (date) value in the first table to the same date in the second table

Aug 23rd, 2009 01:01
johnny deep, dman, Narendra Jain, Nico Dei Gabbiani, http://sturly.com


As MySQL does not have the nested join available, the only way to do
this is to process the data using a temporary table. This is how you
would do this:
http://www.websitecompanyindia.com/Links5.htm
http://www.websitecompanyindia.com/Links4.htm
http://www.websitecompanyindia.com/Links3.htm
http://www.websitecompanyindia.com/Links2.htm
http://www.websitecompanyindia.com/Links1.htm
http://www.websitecompanyindia.com/Links.htm
http://www.websitecompanyindia.com/add-url-form.htm
http://www.websitecompanyindia.com/addyourlink.htm
http://www.websitecompanyindia.com/brochure-design.htm
http://www.websitecompanyindia.com/print-design.htm
http://www.websitecompanyindia.com/software-development-india.htm
http://www.websitecompanyindia.com/Internet-Marketing.htm
http://www.websitecompanyindia.com/logo-design-india.htm
http://www.websitecompanyindia.com/graphic-design.htm
http://www.websitecompanyindia.com/multimedia-webdesign.htm
http://www.websitecompanyindia.com/web-hosting-india.htm
http://www.websitecompanyindia.com/Feedback.htm
http://www.websitecompanyindia.com/Web-Development-India.htm	
http://www.websitecompanyindia.com/Web-Design-India.htm
http://www.websitecompanyindia.com/SEO-Services-India.htm
http://www.websitecompanyindia.com/About-us.htm
http://www.websitecompanyindia.com/index.html
http://www.websitecompanyindia.com/index.htm
http://www.websitecompanyindia.com/Resources.htm
http://www.websitecompanyindia.com/seo-Links.htm
http://www.websitecompanyindia.com/links.htm
http://www.websitecompanyindia.com/disclaimer.htm
http://www.websitecompanyindia.com/add-url-form.php
http://www.websitecompanyindia.com/sitemap.htm
http://www.websitecompanyindia.com/Software-Development-india.htm
http://www.websitecompanyindia.com/seo-services-india.htm
http://www.websitecompanyindia.com/web-development-india.htm
http://www.websitecompanyindia.com/web-design-india.htm
http://www.websitecompanyindia.com/Contact-us.htm
http://www.websitecompanyindia.com/Case-study.htm
http://www.websitecompanyindia.com/services.htm
http://www.websitecompanyindia.com/about-us.htm
http://www.websitecompanyindia.com/
http://www.websitecompanyindia.com/free_templates.htm
create temporary table a123 (max_date date)
;
insert into a123
select max(date1) from table1
;
select data21, data22, date2
from table2, a123
where date2 = max_date
;