Xref: alice comp.databases.oracle.tools:42176
Message-ID: <38E8C894.28D5EC45@fastnet.net.mt>
Date: Mon, 03 Apr 2000 18:36:37 +0200
From: Jonathan Bartolo <jonabart@fastnet.net.mt>
X-Mailer: Mozilla 4.7 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.databases.oracle.tools
Subject: Update transaction
Content-Type: multipart/alternative;
 boundary="------------77219477F58D9E4AC692B294"
X-Trace: 3 Apr 2000 18:28:56 +0200, d1m04.fastnet.net.mt
Lines: 77
Path: alice!news-feed.fnsi.net!newsfeed.icl.net!newsfeed00.sul.t-online.de!t-online.de!bignews.mediaways.net!newsfeed.nettuno.it!server-b.cs.interbusiness.it!news.waldonet.ent.mt!d1m04.fastnet.net.mt
--------------77219477F58D9E4AC692B294
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Can I update a field of a table from a procedure. I have this procedure
<br><i>create Procedure Tran2 (publish IN book.publisher%type) is</i>
<br><i>&nbsp;Type price_data_record is record</i>
<br><i>&nbsp; (ISBN_NO book.ISBN%TYPE,</i>
<br><i>&nbsp;&nbsp; book_name book.name%TYPE,</i>
<br><i>&nbsp;&nbsp; author_name book.author%TYPE,</i>
<br><i>&nbsp;&nbsp; book_price book.price%type,</i>
<br><i>&nbsp;&nbsp; new_book_price book.price%type);</i>
<br><i>&nbsp;&nbsp; price_record price_data_record;</i>
<br><i>&nbsp;CURSOR c2 is</i>
<br><i>&nbsp; Select ISBN, name, author, price</i>
<br><i>&nbsp; from book</i>
<br><i>&nbsp; where book.publisher = publish;</i>
<br><i>Begin</i>
<br><i>&nbsp;Open c2;</i>
<br><i>&nbsp;LOOP</i>
<br><i>&nbsp; Fetch c2 into price_record;</i>
<br><i>&nbsp; exit when C2%NOTFOUND;</i>
<br><i>&nbsp; DBMS_output.Put_line('ISBN No '|| price_record.ISBN_NO);</i>
<br><i>&nbsp; DBMS_output.Put_line('Name of Book '|| price_record.book_name);</i>
<br><i>&nbsp; DBMS_output.Put_line('Author '|| price_record.author_name);</i>
<br><i>&nbsp; DBMS_output.Put_line('Price Lm'|| price_record.book_price);</i>
<br><i>&nbsp; <b>DBMS_Output.Put_line('New Price'||:new_book_price);</b></i><b></b>
<p><b>This line is the problem ... I need to update this record with a
new price. But the user has to input the new price.</b>
<br><b>When I try to compile this procedure it telling me that i have a
bad Variable bind</b>
<br>Can you help me please
<p>Regards
<br>Jonathan</html>

--------------77219477F58D9E4AC692B294--

