lazy_scrapper
Registered User.
- Local time
- Yesterday, 16:51
- Joined
- Sep 8, 2009
- Messages
- 11
Hi i have a question in regards to how would i create a query that would produce the results for the following tables:
My expected errors across these two tables are:
Effectivity 9 for A000103 rev 2 in Table 1 is not present in Table 2.
Effectivity 5 and 6 for A000103 rev 2 in Table 2 not present in Table 1.
Have tried the following to identify whats different but I do not get the results i want.
One query that inner joins on SA_ID and SA_REV only:
SELECT Table1.SA_ID, Table1.SA_REV, Table1.EFFECTIVITY, Table2.EFFFROM, Table2.EFFTO
FROM Table1 INNER JOIN Table2 ON (Table1.SA_REV = Table2.SA_REV) AND (Table1.SA_ID = Table2.SA_ID)
WHERE (((Table1.EFFECTIVITY) Not Between [Table2].[EFFFROM] And [Table2].[EFFTO]));
My expected errors across these two tables are:
Effectivity 9 for A000103 rev 2 in Table 1 is not present in Table 2.
Effectivity 5 and 6 for A000103 rev 2 in Table 2 not present in Table 1.
Have tried the following to identify whats different but I do not get the results i want.
One query that inner joins on SA_ID and SA_REV only:
SELECT Table1.SA_ID, Table1.SA_REV, Table1.EFFECTIVITY, Table2.EFFFROM, Table2.EFFTO
FROM Table1 INNER JOIN Table2 ON (Table1.SA_REV = Table2.SA_REV) AND (Table1.SA_ID = Table2.SA_ID)
WHERE (((Table1.EFFECTIVITY) Not Between [Table2].[EFFFROM] And [Table2].[EFFTO]));