In this example, the idea is to have the first day of the month as the "startdate" and the last day of the month as the "enddate." However, as you can see, the "Enddate" in Row 3 is wrong. It should be 20070331.
Which query can I use to compare differing values like these in Sybase SQL? Currently, my table has over 6 million rows and I think there are thousands of errors like the one above.