I have this T-SQL statement
select a.CODE
from MASTER..MASTERADD a, MASTER..MASTER b
where a.TELO = '18002000047'
OR a.MOBILE = '18002000047'
AND b.TPIN = '42589'
and a.code = b.code
AND
select a.CODE
from MASTER..MASTERADD a, MASTER..MASTER b
where a.TELO = '18001147722'
OR a.MOBILE = '18001147722'
AND b.TPIN = '56783'
and a.code = b.code
The first statement returns 1 result (single line) (CODE)
The second returns 'CODE' but repeated like about 9000+ times.
What am I doing wrong?