February 27, 2006 at 4:52 pm
Hi
I am having to fetch record from 2 tables A and B.
I need to get all the rows from A , all the rows from B with out duplicates.
that is A (+) B (-) A intersection B.
Cannot use union here. Full outer join is giving duplicates...how can I achieve this.
Thanks
February 27, 2006 at 4:57 pm
Select A.Field1, A.Field2, B.Field2
FROM A
Left JOIN B on A.Field3 = B.Field1
GROUP BY A.Field1, A.Field2, B.Field2
_____________
Code for TallyGenerator
March 1, 2006 at 8:59 pm
Why can you not use unions? If you know how to do it with a union but some GUI tool you are using doesn't like it, then use your union as a derived table and selected from it instead...
something like
select *
from (
my select statement with unions, etc
)
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply