Wildcards

User c29d691f4a

03-11-2010 15:36:26

Greetings,


  I would like to search for the percentage sign, %, in a text field.  Is there an escape character I can use to disable the symbol's wildcard properties?


Thanks!


Chris




Instant JChem Version: 5.3.4 (build: 100615)
JChem Version:
5.3.4
JChem Table Version: 5030300
Marvin Version:
5.3.4 (build date: 2010-06-15)
Java: 1.6.0_18; Java
HotSpot(TM) Client VM 16.0-b13
System: Windows XP version 5.1
running on x86; Cp1252; en_US (instantjchem)
NetBeans build:
200906241340     

ChemAxon fa971619eb

03-11-2010 16:19:16

It seems that this is not possible at present.


SQL does provide such a mechanism by specifying an escape character using a syntax like this:


SELECT name FROM emp WHERE id LIKE '%/_%' ESCAPE '/';

But IJC does not provide a way to specify the escape character.


Hoewever if you are uisng a MySQL database it seems that you are lucky as the backslash character is provided as the default escape character, so to find a value like 37% in a text field you can enter the term like this:


%37\%%


But if you are using a Derby local database or an Oracle database then you are out of luck.


Tim