|
|
|
|
can update give a data not found error [message #286060 is a reply to message #286048] |
Thu, 06 December 2007 06:57 |
manisha_g
Messages: 12 Registered: December 2007
|
Junior Member |
|
|
am using an update statement in a pro c code.
It gives me a data not found error.
Needed to know on this as according to me update should not give a data not found error.
same update when used in a PLSQL block does not give any error.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Can update statement give a no data found error? [message #286206 is a reply to message #286120] |
Thu, 06 December 2007 21:08 |
manisha_g
Messages: 12 Registered: December 2007
|
Junior Member |
|
|
Yes i agree that there are no records matching taht condition in the table,but as per my knowledge update does not throw a no data found error.hence i have the doubt.
The same update given in a plsql block does not throw this error even though it does not find any records to match its condition.
|
|
|
|
|
|
|
|
|
Re: Can update generate a no_data_found [MERGED] [message #286311 is a reply to message #286308] |
Fri, 07 December 2007 02:46 |
|
MarcS
Messages: 312 Registered: March 2007 Location: Antwerp
|
Senior Member |
|
|
manisha_g wrote on Fri, 07 December 2007 09:32 | Also please can you explain this a little more:
"It's up to the application to verify if the "NO DATA FOUND" situation is a real error or not."
If there is some document that i can read,please share the same with me.
|
What I meant to say is that it is application-specific behavior whether a NO_DATA_FOUND situation should be considered as an appliation error or just a warning.
A little sample: a client-table needs to be updated for some reason. Like: every client that lives in the United States:
UPDATE CLIENT
SET some_column = some_value
WHERE CLIENT_COUNTRY = 'US' ;
It could be considered perfectly normal that no records are updated as you don't have any clients in the US.
But what if you have a table PROCESS_FLOW where you keep track of the state of a PROCESS?
You expect a specific row (or number of rows) to be in there, and they aren't?
UPDATE PROCESS_FLOW
SET FLOW_STATUS = 'IN PROGRESS'
WHERE PROCESS_NAME = 'INVOICING' ;
I assume that the INVOICING record should be there at all times. If this update failes, then something could be very wrong with my data.
Hope this clarifies my point a bit
[Updated on: Fri, 07 December 2007 02:47] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|