Okay here is my SQL:-
SELECT Telephone,
Houseno,
Street,
Tostreet,
Passengername,
Acceptancedate
FROM Telephone
WHERE Acceptancedate !> '2014/05/01'
AND Telephone LIKE '011%'
AND ( Zoneno = '6'
OR Zoneno = '5'
OR Zoneno = '9'
OR Zoneno = '108' )
AND Telephone = 'XXX'
ORDER BY Acceptancedate
This displays 5 records for this phone number.
However, if I change the !> to >
it shows 3 records.
The SQL I have is correct, but I only want to display the numbers IF this telephone number doesn't appear when AcceptanceDate > '2014/05/01' (as the phone numbers are not unique)
Any help would be much appreciated!