Today in a data extraction program encountered a problem for a long time to solve, this is not a technical problem, but common sense and careful questions. Write it up so that everyone can pay attention to it.
Because the previous program was long-term with Oracle, and the data marker field takes the date type. In Oracle, the date format is basically "date and time", so my program also uses the string format date format "Yyyy_mm-dd HH:mm:ss"
But this time swap with SQL Server, the program also as usual in this way to extract data, the results found every time the data are revisited, toss a long, and finally found that SQL Server date field contains a millisecond value. So I'm going to revisit the last few pieces of data every time.
There were two reasons for the post-mortem analysis.
1: Inertia thinking due to long-term use of Oracle's date format.
2: In fact, many times the SQL Server value, also see the millisecond value, but did not think, thought is to save the maximum value, the next time to extract data from the maximum. Too careless to be caused.
SQL Server Date field considerations for Query flag fields