Hi Tore,

Thank you so much. You are correct, I had duplicate
records in the file. I haven't finish cleaning up the
table. Once I finish cleaning and run the query  and
if I still duplicate, I will let you know.

Till then, thank you so much for the answer.
Unni
--- Tore Bostrup <[EMAIL PROTECTED]> wrote:
> The only reason I could see for this would be if you
> have duplicates (across
> date num1 num2 time) in both tables, or
> quadruplicates in one.
> 
> You join looks correct, so take a closer look at
> your data.  Try running the
> following queries:
> 
> SELECT A.date, num1, num2, A.time, Count(*)
> FROM A
> GROUP BY A.date, num1, num2, A.time
> HAVING Count(*) > 1
> 
> SELECT B.date, num1, num2, B.time, Count(*)
> FROM B
> GROUP BY B.date, num1, num2, B.time
> HAVING Count(*) > 1
> 
> 
> HTH,
> Tore.
> 
> ----- Original Message -----
> From: "Ramesh Pillai" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, February 27, 2003 10:36 PM
> Subject: Inner join question!
> 
> 
> > All,
> >
> > I have two tables like the following
> >
> > table A
> > date num1 num2 time
> >
> > table B
> > date num1 num2 time
> >
> > When I run a query like the following
> >
> > select * from A as a inner join B as b
> > on a.num1 = b.num1 and a.date=b.date and
> a.num2=b.num2
> > and a.time=b.time
> >
> > I am getting the results repeated 4 times, could
> > someone tell me why I am getting 4 rows and how
> can I
> > elliminate it?
> >
> > Thanks.
> > Ramesh
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Tax Center - forms, calculators, tips, more
> > http://taxes.yahoo.com/
> >
> >
>
---------------------------------------------------------------------
> > Before posting, please check:
> >    http://www.mysql.com/manual.php   (the manual)
> >    http://lists.mysql.com/           (the list
> archive)
> >
> > To request this thread, e-mail
> <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try:
> http://lists.mysql.com/php/unsubscribe.php
> >
> 
> 
>
---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list
> archive)
> 
> To request this thread, e-mail
> <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
>
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try:
> http://lists.mysql.com/php/unsubscribe.php
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to