|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Where fieldName like *value* Pb
/************************************************/
Database db=new Database(); db.setConnection(new com.borland.dx.sql.dataset.ConnectionDescriptor(this.JdbcOdbc, "", "", false, "sun.jdbc.odbc.JdbcOdbcDriver")); SQL= SELECT * FROM tableName WHERE fieldname like *value *; QueryDataSet q= new QueryDataSet(); q.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(db, s, null, true, Load.UNCACHED)); /************************************************/ This return me a data set containing rows where fieldname is exactly like *value *. The expected data set is set of rows where fieldname=value 1or fieldname=the value 1 or fieldname=dgdgvalue 04121, for example. Here JBuilder considers the character * not a special one (idem for the character ?). This problem is also faced with any other programming language (If I dont make an error!!) Please help me to get returned the right data set returned. Thanks |
|
#2
|
|||
|
|||
|
Oracle doesn't use * or ? as wildcards, instead it uses % and _. if you replace you make this change it should bring to a little closer.
|
|
#3
|
|||
|
|||
|
If I use MS ACCESS as a storage, the wildcards are * and ?.
Do you see any solution? thanks... |
|
#4
|
|||
|
|||
|
The SQL Standard defined wildcard is a %. Apart from MS ACCESS no (decent) DBMS that I know of uses the * as the wildcard character. The question is therefor: how do you cope with this in MS ACCESS
|
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Where fieldName like *value* Pb |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|