Hello,
I have two tables that I am trying to compare data with.
Both tables contain a Surname, a DateOfBirth and a SequenceNumber. I want to return the records where the Surname and DateOfBirth match.
eg. If there is a John born on 11/03/1955 in table 1 and a John born 11/03/1955 in table 2, I want to return the sequence number from table 1.
Im using this query but I know it sucks..!
SELECT ID, Surname, DateOfBirth , SequenceNumber
FROM dbo.tblTable1 M INNER JOIN
dbo.tblTable2 A
WHERE (M.Custname AND M.CustDob = A.Custname AND A.CustDOB)
Can anyone help?
I have two tables that I am trying to compare data with.
Both tables contain a Surname, a DateOfBirth and a SequenceNumber. I want to return the records where the Surname and DateOfBirth match.
eg. If there is a John born on 11/03/1955 in table 1 and a John born 11/03/1955 in table 2, I want to return the sequence number from table 1.
Im using this query but I know it sucks..!
SELECT ID, Surname, DateOfBirth , SequenceNumber
FROM dbo.tblTable1 M INNER JOIN
dbo.tblTable2 A
WHERE (M.Custname AND M.CustDob = A.Custname AND A.CustDOB)
Can anyone help?