I think a distinct around the tbl1a select statement will probably do it.
select distinct(tbl1.a), tbl1.b, tbl1.c, tbl2.a, tbl2.e FROM tbl1, tbl2 WHERE tbl1.a = tbl2.a AND tbl1.b = VALUE
Hi
I am joining 2 tables using an expression like:
Due to the nature of the data I am getting duplicate rows.PHP Code:select tbl1.a, tbl1.b, tbl1.c, tbl2.a, tbl2.e FROM tbl1, tbl2WHERE tbl1.a = tbl2.a AND tbl1.b = VALUE
Is there a quick SQL method to remove duplicate rows?
Do I put distinct() round each of the columns?
Cheers
Follow Me | Looking for Merchants Who Do Scifi Stuff
I think a distinct around the tbl1a select statement will probably do it.
select distinct(tbl1.a), tbl1.b, tbl1.c, tbl2.a, tbl2.e FROM tbl1, tbl2 WHERE tbl1.a = tbl2.a AND tbl1.b = VALUE
Cheers. That appears to work.
Follow Me | Looking for Merchants Who Do Scifi Stuff
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks