select * from <table> where DATEPART(dd, <date_column>)= DATEPART(dd, getdate()-1)

Hi, I found a problem with the above code when trying to use it. It doesn't take into account which month or year the date is associated with and only matches the day of month number.

After a bit of research (as I'm no expert) I have come up with these solutions which seem to work....not sure how efficient they are but the certainly...