Oracle queries contain special characters%,_,&, and you want to query the contents of a field in a datasheet that contain this special character, you need to use the escape character, or the method of stitching the string.
0. The original data
SELECT * from t_web_groups where groupid=10088;
---------------------------------------------------------------------------
GROUPID groupname OWNER datecreated Groupcode
10088 sx&nm CV 05202367 8/17/2011 10:53:00 AM R154
---------------------------------------------------------------------------
1. Through select ASCII (' & ') from dual; You can get the ASCII code you want.
Select ASCII (' & ') from dual;
---------------------------------------------------------------------------
ASCII (' & ')
38
2. Use escape characters instead of special characters
SELECT * from t_web_groups where groupname = ' SX ' | | Chr (38) | | NM CV ';
or stitching query statements
SELECT * from t_web_groups where groupname = ' SX ' | | & ' | | ' NM CV ';
can query for success.
[Notes] special characters Insert data table (add \ Special handling)
1.insert into test values (' test\%test ');
2. Insert into test values (' Test ' test ');
3..insert into test values (' test\_test ');