Home » SQL & PL/SQL » SQL & PL/SQL » Update query is not working ?
Update query is not working ? [message #235817] Tue, 08 May 2007 01:39 Go to next message
naimish_hit
Messages: 34
Registered: March 2007
Member
Hi,

I have got very strange problem!

I have a procedure for updating activity_master table.

My problem is that if I try to update any record in this table by issueing Update statement then its working but same statement neither updates nor return any error when I put it in a Procedure !!

What could be the problem ? Table structure and Procedure is given below.

CREATE TABLE activity_master (
  activityid NUMBER       NOT NULL,
  activity   VARCHAR2(50) NOT NULL,
  isactive   CHAR(1)      NOT NULL
)
/

ALTER TABLE activity_master
  ADD CONSTRAINT activity_master_pk PRIMARY KEY (
    activityid
  )
/

insert into activity_master values(1, 'aaaa', 'Y');
insert into activity_master values(2, 'zzzz', 'Y');
insert into activity_master values(3, '1212', 'Y');

create or replace procedure "UPDATEACTIVITY"
(activityid  NUMBER,activity  VARCHAR2,isactive  CHAR)
AS
begin
  update activity_master
  set
    ACTIVITY=activity,
    ISACTIVE=IsActive
  where
    ACTIVITYID=activityid;
END UPDATEACTIVITY;


Regards,

Naimish R. Dave
Re: Update query is not working ? [message #235824 is a reply to message #235817] Tue, 08 May 2007 01:54 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
Laughing That's a good one!

Have a look at your column names and at the parameter names. Do you see any similarities? Now, what happens if you would change the names of your parameters?

MHE
Re: Update query is not working ? [message #235844 is a reply to message #235817] Tue, 08 May 2007 02:44 Go to previous message
naimish_hit
Messages: 34
Registered: March 2007
Member
Thanks Maher, I got the problem Razz

Regards,

Naimish R. Dave
Previous Topic: How to get output like this
Next Topic: HELP WANTED
Goto Forum:
  


Current Time: Fri Dec 09 05:59:29 CST 2016

Total time taken to generate the page: 0.08486 seconds