Summary: A single quotation mark (single quotation mark) may also cause unnecessary bugs.
After 1: Yesterday, the pharmacological base module (the company's module) completed a "user permission management" module, which was packaged and released to the server of the testing department. result on the server of the test department, it is found that the user module cannot select the user if the Department is not selected. -1
Figure-1
After finding this problem, I went back to the development database for testing and found that the same problem exists. In the future, I, chubby, and Zhou Hao, all of them are doing so.CodeCheck, but no problem is found. however, when selecting a specific department ID, you can retrieve the data. the key to the problem should be that there is no difference between a department and a department. because we use Asp.net and Ajax technology, the problem may be caused by data transmission. therefore, when debugging the data in both cases, we finally found the difference and extracted the data, as shown in-2.
Figure 2
The first part is the user information without the Department ID; the second part is the user information with the department ID. What are the differences between them? Haha!
From the font color perspective, in the first two lines of the first part, Yu Jia and Zhu Jing junk (not in my opinion) fields are in black color, while other font colors are in light blue (normal) color, which is the problem. there is a single quotation mark (') behind them, which is the single quotation mark. In Asp.net and client script, single quotation marks are very sensitive characters. During data transmission between the server and client,ProgramUse single quotes to determine whether the string ends (this is easy to understand, and it is complicated in others). Remove this annoying single quotes and then run the program. Everything is normal, as shown in-3.
Figure-3
Conclusion 1:
1.Sensitive characters such as single quotes and double quotes should be retrieved and removed directly during data input, or the user should be prompted. In short, do not store them in the database as much as possible, I don't know why this is strange.
2: when the newly compiled program is overwritten on the testing server, the problem is resolved and the problem still exists. it seems that we were so happy. no real success yet! I copied the SQL syntax to the PL/SQL environment and found that the execution was unsuccessful.-4
Do you know what the problem is? In the third line, in decode, the comma after 'male' and the comma after '2' use the fullwidth...
The reason is that the testing department uses oracle10 and cannot process the full-width characters, while the Development Department uses oracle9. I don't know if this explanation is valid)
After you change it to a half-width comma, the problem will be solved. Then, no similar problem will occur, so you can go home with peace of mind.
Conclusion 2:
1. oralceThe database may have different results in some functions due to different versions.
2.It is recommended that you run the stored SQL syntax in the PL/SQL environment to check whether it is successful.
3.We recommend that you use the same oracle version.