Re: Re: [firebird-support] update all records

2016-05-07 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
On Fri, May 6, 2016 at 2:05 AM, liviuslivius liviusliv...@poczta.onet.pl [firebird-support] wrote: > > > He wrote: > > all records inserted by tr2 are not updated if tr1 is e.g. snapshot > or during tr1 update there are inserts. > > I wrote: > > Actually, that's not true. > > > And I was wrong an

Re: Re: [firebird-support] update all records

2016-05-05 Thread liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
  , liviusliv...@poczta.onet.pl [firebird-support] responded     one of possible reason is that records are not visible to transaction with this update statement. e.g. 1. you start transaction (tr1) 2. someone start transaction 2(tr2) 3. tr2 insert some records 4. tr1 run update 5. tr2 commit 6. t

Re: [firebird-support] update all records

2016-05-05 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
Sergio asked why this statement update stock set actualizar = 0 where 1=1 doesn't update all records in the stock table. First, the clause "where 1=1" is unnecessary. The update statement does not requires a where clause and in the absence of a where clause, it affects all records in

Re: [firebird-support] update all records

2016-05-05 Thread liviusliv...@poczta.onet.pl [firebird-support]
2016 9:55 PM To: firebird-support@yahoogroups.com Subject: Re: [firebird-support] update all records Hello, I don't understand your SQL : "Where 1=1" first "1" is a field name ? if "Where actualizar=1" it may works ? The condition is on records, and mus

Re: [firebird-support] update all records

2016-05-05 Thread Michel LE CLEZIO mlcvi...@yahoo.fr [firebird-support]
Hello, I don't understand your SQL :"Where 1=1"   first "1" is a field name ? if "Where actualizar=1" it may works ?The condition is on records, and must use fields values...no ? If you don't use condition, all records should be updated to the same value 0... "Update stock set actualizar=0"  shou

Re: [firebird-support] update all records

2016-05-05 Thread liviusliv...@poczta.onet.pl [firebird-support]
Hi, one of possible reason is that records are not visible to transaction with this update statement. e.g. 1. you start transansction (tr1) 2. someone start transaction 2(tr2) 3. tr2 insert some records 4. tr1 run update 5. tr2 commit 6. tr1 commit all records inserted by tr2 are not updated if

Re: [firebird-support] update all records

2016-05-05 Thread kristinwens...@yahoo.com [firebird-support]
Thanks On Wednesday, May 4, 2016 6:45 PM, "shg_siste...@yahoo.com.ar [firebird-support]" wrote:   hello! I've been googling but found nothing about it. Why this sentence does not update all the records in the table? (FB 2.5) update stock set actualizar = 0 where 1=1 Thanks!! Sergio