how to update emp_name using implicit cursor in oracle.

for this purpose i wrote a program in pl/sql

DECLARE  
 var_names VARCHAR2(30);
BEGIN
  UPDATE emp
  SET emp_name= emp_name +'garu';
  IF SQL%NOTFOUND THEN
    dbms_output.put_line('None of the salaries where updated');
  ELSIF SQL%FOUND THEN
  var_names:=sql%rowcount;
    dbms_output.put_line('Salaries for ' || var_names|| 'employees are updated');
  END IF; 
END;

but showing error,that is

Error report:
ORA-01722: invalid number
ORA-06512: at line 4
01722. 00000 -  "invalid number"
*Cause:    
*Action:

can any one clarify my doubt..

asked 13 Sep '13, 01:57

ram34874's gravatar image

ram34874
0222
accept rate: 0%

closed 13 Sep '13, 09:36

Mark%20Culp's gravatar image

Mark Culp
23.3k9132274

Comment Text Removed

The question has been closed for the following reason "Question is off-topic or not relevant" by Mark Culp 13 Sep '13, 09:36


This forum is focused on SAP Sybase SQL Anywhere. Please find an appropriated forum for Oracle questions and post your question there.
Have a look at Oracle Database

permanent link

answered 13 Sep '13, 09:31

Reimer%20Pods's gravatar image

Reimer Pods
4.2k344583
accept rate: 11%

edited 13 Sep '13, 09:34

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×27
×18

question asked: 13 Sep '13, 01:57

question was seen: 635 times

last updated: 13 Sep '13, 09:36