You could use a JOIN?  eg
 
SELECT s.CustCode, s.DestCode, COUNT(*)
    FROM SaleREF s JOIN CustDest d
        ON s.CustCode=d.CustCode and s.DestCode=d.DestCode
GROUP BY s.CustCode, s.DestCode
 
 
Paul Ritchie
Radio Computing Services.
 
-----Original Message-----
From: Mark Howard [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 15, 2001 10:06 AM
To: Multiple recipients of list database
Subject: [DUG-DB]: SQL poser

Hi all
 
I want to do the following: (in Paradox 7)
 
Select count(*) from SaleREF sr
where (sr.CustCode, sr.DestCode) in
(select distinct (CustCode, DestCode)  from CustDest)
 
ie I want to count the number of times that a CustCode/DestCode pairing that appears in the CustDest table also appears in the SaleREF table.
 
How can I do this, please?
 
Mark
 
 

Reply via email to