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:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old April 29th, 2004, 03:44 PM
cmezoom56 cmezoom56 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 5 cmezoom56 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Adding "like" to a prompt in SQL oracle

I'm trying to create a query for a CD collection. I need a prompt that will search for any part of a song title in either lower or upper case, but I'm having problems. I know how to do a prompt and know how to search for part of a string, but can't seem to put the 2 together. Here's my query (that's not working):

SQL> select l.labelname, c.catnum, a.artistfirst, a.artistlast, c.title, s.songtitle
2 from cdlabel l, cdcatelog c, artist a, song s
3 where l.labelcode = c.labelcode
4 and c.catnum = s.catnum
5 and a.artistnum = c.artistnum
6 and lower(s.songtitle) like '&%EnterTitle%'
7 ;

I have tried every which way for the syntax on line 6 to work to no avail. What am I doing wrong?

Thanking you in advance,
Cheryl

Reply With Quote
  #2  
Old April 29th, 2004, 06:24 PM
cmezoom56 cmezoom56 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 5 cmezoom56 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I figured it out. Last line should read:
and lower(s.songtitle) like '%&Entertitle%'

I was sure I had tried it that way earlier, but I guess not. *sigh*

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Adding "like" to a prompt in SQL oracle


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 1 hosted by Hostway