|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Where fieldName is 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 is 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
|
|||
|
|||
|
...WHERE fieldName LIKE '%" & whateverVar & "%'"
|
|
#3
|
||||
|
||||
|
which database is this?
because you already posted this same question in the general database and mysql forums (please note, you should only ever post a question in a single forum) |
|
#4
|
|||
|
|||
|
Thanks
Thanks, % worked well....
|
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Where fieldName is like *value* Pb |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|