MySQL Forums
Forum List  »  Other Migration

Re: Comparing two tables
Posted by: Nick Roper
Date: July 28, 2004 04:01AM

Hi Natasha,

> Table2 has only 20 rows, 2 columns; one of its columns is an identifier and the other is made up of periods similar to those in the first table.

If the column definitions for Table2.Period and Table1.Period are similar, then wouldn't you need to compare rounded values from both tables? e.g.:

SELECT Table1.Period, Table2.Period, Table2.ID FROM Table1, Table2 WHERE ROUND(Table1.Period,3)=ROUND(Table2.Period,3);

Or are the column definitions and data values different?

If so, can you post the table definitions:

mysql> SHOW CREATE TABLE Table1;
mysql> SHOW CREATE TABLE Table2;

and also some example data from both tables (particularly where you would expect the join to work)







--
Nick Roper

Options: ReplyQuote


Subject
Views
Written By
Posted
18397
July 27, 2004 07:38AM
Re: Comparing two tables
11067
July 28, 2004 04:01AM
5027
July 28, 2004 05:55AM
4642
July 28, 2004 07:26AM
3624
July 30, 2004 07:48AM
3315
July 30, 2004 09:00AM
3541
July 30, 2004 10:57AM
3123
August 02, 2004 10:02AM
2924
August 02, 2004 10:22AM
3083
August 02, 2004 03:42PM
3098
August 03, 2004 04:10AM
3847
August 03, 2004 04:30AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.