Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Finding out how many rows were updated?

Re: Finding out how many rows were updated?

From: dx <seaelephant_at_hotmail.com>
Date: 19 Dec 2003 11:51:17 -0800
Message-ID: <7f28ac37.0312191151.4889c066@posting.google.com>


"Paul Tomlinson" <rubberducky703_at_hotmail.com> wrote in message news:<brv684$80len$1_at_ID-116287.news.uni-berlin.de>...
> Yeah, yeah, cut and paste error.
>
> That is not the problem.
>
>
>
> "Daniel Morgan" <damorgan_at_x.washington.edu> wrote in message
> news:1071848161.353211_at_yasure...
> > Paul Tomlinson wrote:
> >
> > > All,
> > >
> > > Why does Oracle reject the following SQL as invalid?
> > >
> > > UPDATE COMPANIES
> > > SET CONTACT = p_contact,
> > > WHERE COMPANY_ID = p_CompanyID
> > > RETURNING SQL%ROWCOUNT
> > > INTO v_noupdated;
> > >
> > > I get "PL/SQL: ORA-00911: invalid character"
> > > I want a way to pass back to my (C++) program the number of rows that
> this
> > > statement updated.
> > >
> > > Your thoughts?
> >
> > SET CONTACT = p_contact,
> >
> > To start with. What is the comma supposed to do?
> >
> > --
> > Daniel Morgan
> > http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
> > http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
> > damorgan_at_x.washington.edu
> > (replace 'x' with a 'u' to reply)
> >

You can't use sql%rowcount in "returning into" clause.

try this:

UPDATE COMPANIES
SET CONTACT = p_contact
WHERE COMPANY_ID = p_CompanyID;

v_noupdated := sql%rowcount; Received on Fri Dec 19 2003 - 13:51:17 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US