Home » SQL & PL/SQL » SQL & PL/SQL » Update Problem (SQL PLUS, 10g, WINDOWS NT)
Update Problem [message #428432] Wed, 28 October 2009 06:16 Go to next message
pstanand
Messages: 98
Registered: February 2005
Location: Chennai,India
Member
Hi,
I have problem in updating a table. Actually the Table is created in Schema A. And a public synonym has been created on the table and granted to User B. Now I logged in as user B and trying to update the table. The following are the results I got while doing the update on Sql plus. But the table is not get updated. I'm out of sight. Even after commiting the transaction it is not reflecting. Could anyone please let me know why this is happening.
SQL> select julian_dt,cmpgn_nr from sir_invc where acct_nr=63720885 and cmpgn_nr=13;

 JULIAN_DT   CMPGN_NR
---------- ----------
       211         13

SQL> update sir_invc set julian_dt=222 where julian_dt=211 and cmpgn_nr=13 and acct_nr=63720885;

1 row updated.

SQL> commit;

Commit complete.

SQL> select julian_dt,cmpgn_nr from sir_invc where acct_nr=63720885 and cmpgn_nr=13;

 JULIAN_DT   CMPGN_NR
---------- ----------
       211         13

SQL> 


Regards,
PstAnand

[EDITED by LF: applied [code] tags]

[Updated on: Thu, 29 October 2009 02:29] by Moderator

Report message to a moderator

Re: Update Problem [message #428439 is a reply to message #428432] Wed, 28 October 2009 06:29 Go to previous messageGo to next message
Michel Cadot
Messages: 63802
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Without the complete setup we can reproduce, the answer is no.

Regards
Michel
Re: Update Problem [message #428604 is a reply to message #428432] Thu, 29 October 2009 02:23 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Any triggers on your table?
Re: Update Problem [message #428764 is a reply to message #428432] Thu, 29 October 2009 20:27 Go to previous message
Kevin Meade
Messages: 2098
Registered: December 1999
Location: Connecticut USA
Senior Member
there are several possibilities. Here are some of them:

1) you are not updating the object you think you are. Do some queries against the data dictionary to see if there is an object owned by user B with the same name. This could only be so if you are lieing to us and the results you are showing are actually from two different sqlplus sessions that you pasted together.

2) you are updating a view with an instead of trigger and the instead of trigger is not doing the update you think it is.

3) both of the above

4) some other form of operator error.

If indeed you are executing these four commands from one sql sqlplus session as you show them then I cannot see how #1 is possible.

My money is on #4. We cannot really tell because you have not provided any code to test.

Provide us with a test case.

Good luck, Kevin

[Updated on: Thu, 29 October 2009 20:31]

Report message to a moderator

Previous Topic: what is the valid parameter to utl_file
Next Topic: Finding a set
Goto Forum:
  


Current Time: Sun Sep 25 19:41:27 CDT 2016

Total time taken to generate the page: 0.04819 seconds