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
  #1  
Old September 15th, 2003, 03:53 PM
Watever Watever is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Montreal, Canada
Posts: 480 Watever User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 29 m 27 sec
Reputation Power: 5
Problems with SQL Query and a partial search - PLEASE HELP !

First of all I would like to say HI to everyone here ! and I hope I can get my little stupid problem solved. I also want to appologize for all my many mistake and bad written. I am not good in english cause I live in Montreal and my first language is french, but I still think I can be understanded and people can help me and that I might could help some people.

Here is my problem. I am in stage in a company where I need to solve the problems there and addapt t he code to be bettet and faster and help the users to work easier. I am not that good with SQL that much and I always make some little mistake some time stupid some time worse probably. ok I think the introduction is enough long.

I don't really understand why I can use the "%" and the "_" on a query string and that on another one I just can't.

If I don't use the special caracters I will get the answer but in my program, the users need to be able to use the * and ? options. It's work fines for the city and road name but doesn't work at all when you are searching for the VPM number (code projet). soo it's kinda weird.

-------------------------------------------------------------------------------

select count(releve.noReleve) FROM Ville INNER JOIN (Rue INNER JOIN
((Compagnie INNER JOIN Releve ON Compagnie.noCie = Releve.noCie)
INNER JOIN Adresse ON Releve.noReleve = Adresse.noReleve)
ON Rue.noRue = Adresse.noRue) ON Ville.noVille = Rue.noVille
where codeProjet = 'vpm%';


on this query I am trying to know how many project name start with VPM but my result is 0 and I know I have some.

cause if I do the same thing but I use VPM1364 has my query I will get 2 answer. like here.

select count(releve.noReleve) FROM Ville INNER JOIN (Rue INNER JOIN
((Compagnie INNER JOIN Releve ON Compagnie.noCie = Releve.noCie)
INNER JOIN Adresse ON Releve.noReleve = Adresse.noReleve)
ON Rue.noRue = Adresse.noRue) ON Ville.noVille = Rue.noVille
where codeProjet = 'vpm1364';


and if I try to use VPM1364% (added the %) it won't find me any results either.

I really don't understand that error. Cause I am doing something really similar with city and roads name and it's work fine. I can use the "%" and "_" caracters and it will find my answer like I want to. It's only with CodeProjet that it doesn't work. Even if it's not a primary key and it's attribute is a string shouldn't be a problem.



I would appreciate if someone could tell me the problem or how to by-pass it ! I just don,t know ! I never got something like that before. May be it's just because I am tired I don't know.

thank you for all your time and help.
__________________

Reply With Quote
  #2  
Old September 15th, 2003, 04:52 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
try LIKE instead of =. As in codeProject LIKE 'vpm%'.

Reply With Quote
  #3  
Old September 15th, 2003, 07:17 PM
Watever Watever is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Montreal, Canada
Posts: 480 Watever User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 29 m 27 sec
Reputation Power: 5
Quote:
Originally posted by bricker42
try LIKE instead of =. As in codeProject LIKE 'vpm%'.


thank you man ! I can't try it now cause I am at home but I am sure it will work ! it's just plain stupid ! I can't understand why I haven'T see it before !

that's what happens when you need to correct others people script and work them better doh !

Reply With Quote
  #4  
Old September 15th, 2003, 07:19 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Hehe. Ya, it's always the small ones that bite you .

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Problems with SQL Query and a partial search - PLEASE HELP !


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

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

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





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