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 October 27th, 2004, 06:45 PM
sundarr123123 sundarr123123 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 8 sundarr123123 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question PLS-00103: error in pl/sql code

CREATE OR REPLACE procedure proc_mgtrptdetails_mon_ca
is
begin
delete from mgtrptdetails_mon_ca;


begin
insert into mgtrptdetails_mon_ca
select
case when (to_char(processdate + (7 -(to_char(processdate, 'D') - 1)),'dd-mon-yyyy') > sysdate) then to_char(sysdate,'dd-mon-yyyy')
else to_char(processdate + (7 -(to_char(processdate, 'D') - 1)),'dd-mon-yyyy' )
end as processdate, state, status, count(polnum) as nbr, sum(annualprem+annualsd) as annualprem
from subcompenddetails
where substr(channel,1,2)='CA' and processdate > '01-oct-2004'
group by processdate,state,status;
end;
commit;
end;

it says
PLS-00103: Encountered the symbol "CASE" when expecting one of the following:

the same insert works fine from sql..

pls help

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > PLS-00103: error in pl/sql code


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 4 hosted by Hostway
Stay green...Green IT