Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 21st, 2004, 11:40 AM
amine amine is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 26 amine User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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 1”or 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 don’t make an error!!)

Please help me to get returned the right data set returned.

Thanks…

Reply With Quote
  #2  
Old November 21st, 2004, 11:49 AM
beunique beunique is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 50 beunique User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
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.

Reply With Quote
  #3  
Old November 21st, 2004, 11:53 AM
amine amine is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 26 amine User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
If I use MS ACCESS as a storage, the wildcards are * and ?.
Do you see any solution?

thanks...

Reply With Quote
  #4  
Old November 21st, 2004, 04:38 PM
shammat shammat is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2003
Location: Munich, Bavaria
Posts: 996 shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 5 h 12 m 14 sec
Reputation Power: 66
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Where fieldName like ‘*value*’ Pb


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway