2005/07/22
Event: I first checked the stored procedure and carefully read the PL/SQL code to find that there was no error, this made me very strange. At this time, I did not dare to directly use toad debugging on the user's system, so I asked the project manager for help, after debugging the code on the user system, he found that the calculation could not be completed because one of my comparison statements throws an exception.
Problem: This comparison statement compares the "date" variable with the "string" variable. The string stores a date string in the yyyymmdd format. In the code, the to_char conversion date variant string variable is used too much to complete the date comparison method. I was confused when I modified the code and kept this obfuscation during the code check, without seeing the problem.
Experience: During Variable comparison, the type should be converted in actual comparison. For example, when comparing dates, both sides of the comparison should be date variables (conversion allowed). Although the comparison results may be correct, do not use string in date format for comparison.
All faces are lost.
Supplement: on April 9, July 27, I communicated with the project manager and learned that the comparison of date strings in Oracle time-based partition tables has higher performance.
========================================================== ==========================================================