-
1. Re: How does one find rows from Table A that are not in Table B?
Tracy RodgersApr 18, 2012 8:52 AM (in response to toddsherwood)
Hi Todd,
Would it be possible to post a sample? Table A and Table B, Field 1 and Field 2 are hard for me to keep straight!
-Tracy
-
2. Re: How does one find rows from Table A that are not in Table B?
toddsherwood Apr 19, 2012 8:08 AM (in response to Tracy Rodgers)Thanks for responding, Tracy. Here are sample data.
Table A (in comma separated format: field 1, field2, [other fields])
row 1 : 11111, "ABC DEF GHI", [other data]
row 2 : 22222, "GHI JKL", [other data]
row 3 : 33333, "ABC GHI", [other data]
Table B (again in csv format, field 1, field 2, [other fields]
row 1 : 11111, "ABC", [other data]
row 2 : 11111, "DEF, [other data]
row 3 : 11111, "GHI", [other data]
row 4 : 22222, "GHI", [other data]
row 5 : 22222, "JKL", [other data]
row 6 : 33333, "ABC", [other data]
row 7 : 33333, "GHI", [other data]
-
3. Re: How does one find rows from Table A that are not in Table B?
Keith Fortowsky Apr 19, 2012 8:20 PM (in response to toddsherwood)1 of 1 people found this helpfulThere is a simple generic answer:
1. Do a left join of TableA and TableB (i.e. result should have one row for each row in TableA)
2. As part of the result table (which we will call TableC), include one field (which we will call FieldB) consisting of any field from TableB that has no null values in TableB ( ex TableB's primary key field)
3. Filter TableC to select only rows with a null in FieldB - this is the result you are looking for.
/Keith F.
-
4. Re: How does one find rows from Table A that are not in Table B?
Keith Fortowsky Apr 25, 2012 8:15 PM (in response to toddsherwood)Hello Todd. Is my response suggesting a join understandable to you, or do I need to add more detail?
/Keith F.
-
5. Re: How does one find rows from Table A that are not in Table B?
toddsherwood Apr 26, 2012 4:48 AM (in response to Keith Fortowsky)Thanks, Keith! Your answer was very helpful.