SELECT rono,patid
FROM [rx].[dbo].[rxs]
WHERE rxs.rono NOT IN (SELECT rono
FROM [rx].[dbo].[rxadmintimes]
WHERE rono IS NOT NULL)
order by rxs.RoNo
Somehow its not giving the right results
SELECT rono,patid
FROM [rx].[dbo].[rxs] rxs
WHERE NOT EXISTS (SELECT 1
FROM [rx].[dbo].[rxadmintimes]
WHERE rxs.rono = rono
AND rxs.rxno = rxno)
ORDER BY rxs.RoNo