If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Help!!!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-08-03, 20:42
cjking777 cjking777 is offline
Registered User
 
Join Date: Sep 2003
Posts: 5
Help!!!

I have a procedure and i dont know why it doesnt work:
SET SERVEROUTPUT ON
CREATE OR REPLACE
PROCEDURE update_price(p_cutoff IN CHAR) AS
change CONSTANT Real := 0.9;
CURSOR c_upgrade_p IS
SELECT price FROM items
WHERE start_date = DATE(p_cutoff)
FOR UPDATE OF price;
BEGIN
FOR c_upgrade_rec IN c_upgrade_p LOOP
UPDATE items
SET price = price * 0.9;
WHERE CURRENT OF c_upgrade_p;
END LOOP;
COMMIT;
END;
/
any help wouldbe great
Reply With Quote
  #2 (permalink)  
Old 09-09-03, 02:46
alligatorsql.com alligatorsql.com is offline
Registered User
 
Join Date: Jul 2001
Location: Germany
Posts: 189
Error

Hello,

pls, post the error.

Best regards
Manfred Peter
Alligator Company Software GmbH
http://www.alligatorsql.com
Reply With Quote
  #3 (permalink)  
Old 09-09-03, 16:45
cjking777 cjking777 is offline
Registered User
 
Join Date: Sep 2003
Posts: 5
Re: Help!!!

the error is simple that it doesnt compile- when i say show err it says the where statement does belong...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On