MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » January 2013

Re: Uniquely identifying a record in SQL without a unique key?



fixed

On 03 Jan 2013 20:03, paultherrien@xxxxxxxxxxxxxxxxxx wrote:
My sense is that you are right in that it is doing an
'Update where' execution, but how would it determine
the 'where' values? How did you select the record
to update in Squirrel?

I expect that the client sfw would have all of the data for each row, a value for each column of each row, of the data that was presented for the "edit", e.g. a scrollable read-only cursor, along with the metadata to understand each value. To locate the row that had been clicked-on in order to activate an edit\change request, the WHERE clause can use an equal predicate on every column with each corresponding value for that row; i.e. WHERE fld1=:v1 AND fld2=:v2 ... AND fldN=:vN. When the SELECT query FOR UPDATE [OF the changed columns] selects more than one row using that WHERE clause, the client sfw can warn about the condition and offer the option to cancel. If the user confirms the request, then that same WHERE clause is used on the UPDATE statement; each changed value specified on a SET. Whether that is what actually transpires for the scenario that was described, can be confirmed using a detailed Database Monitor, by reviewing the logged statements.






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact