If I understand you correctly you want to get a distinct list of ID from Table A and then retrieve the records from Table B that contain the IDs.
In this case you can try the in statement.
eg
Select * from tableB where ID in (select distinct ID from TableA where date not in ('15-Jan-2015','25-Jan-2015'))