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 January 15th, 2004, 12:30 PM
subbu subbu is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 1 subbu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Oracle Error PLS-00103 Encountered the sysbol "CASE"

Hi All,
I am trying compile a procedure with the following statement.
select (CASE WHEN 10 <= 2 THEN 10 ELSE 20 END)
INTO out_val FROM DUAL;

But it is throughing an Error with the following message
PLS-00103 Encountered the sysbol "CASE" when expecting one of the following: .....etc.

I am using Oracle 8.1.7.4.

If Run that statement at SQL > prompt in SQL* PLUS it is working fine.

Thanks for your help

Last edited by subbu : January 15th, 2004 at 12:35 PM.

Reply With Quote
  #2  
Old January 15th, 2004, 05:01 PM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 44 m 30 sec
Reputation Power: 8
Can you post your PL/SQL block?
__________________
El éxito consiste en una serie de pequeñas victorias día a día

MySQL, MS SQL, MS ACCESS, Oracle Database Manager - http://victorpendleton.net/products/psdviewer.html

Reply With Quote
  #3  
Old January 15th, 2004, 08:56 PM
shafique shafique is offline
Senior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Canada
Posts: 305 shafique User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 20 sec
Reputation Power: 5
following code is working fine in oracle9i

declare
out_val number;
begin
select (CASE WHEN 10 <= 2 THEN 10 ELSE 20 END)
INTO out_val FROM DUAL;
dbms_output.put_line(out_val);
end;


i am unable to test it in oracle8i. sorry for that.

Reply With Quote
  #4  
Old January 17th, 2004, 09:15 PM
Dan Drillich Dan Drillich is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 68 Dan Drillich User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
This variant of the CASE expression is definitely available with Oracle 8.1.7 SQL, but as you experienced it is not available with 8.1.7 PL/SQL.

Cheers,
Dan

Reply With Quote
  #5  
Old January 18th, 2004, 04:27 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,826 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 1 Day 11 h 35 m 33 sec
Reputation Power: 278
Are you "translating" from MsSQL or do you dislike "decode"?

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Oracle Error PLS-00103 Encountered the sysbol "CASE"


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