I have data like below:
TABLE 1 TABLE 2
Cust #: Inv #: Cust #: Inv #:
A 1 A 1
A 1
I want to get a count of matches on Cust # and Inv #
SELECT Count('x') AS COUNT
FROM Table1 INNER JOIN Table2 ON (Table1.C# = Table2.I#) AND (Table1.C# = Table2.I#);
But I want it to return the answer of 1 for the above sample data. The SQL above returns the answer of 2.
Does anyone know how to get my desired results?
Thanks
TABLE 1 TABLE 2
Cust #: Inv #: Cust #: Inv #:
A 1 A 1
A 1
I want to get a count of matches on Cust # and Inv #
SELECT Count('x') AS COUNT
FROM Table1 INNER JOIN Table2 ON (Table1.C# = Table2.I#) AND (Table1.C# = Table2.I#);
But I want it to return the answer of 1 for the above sample data. The SQL above returns the answer of 2.
Does anyone know how to get my desired results?
Thanks