Re: How update 1 of two identical rows.

2001-04-11 Thread Bob Hall
>Unfortunately I am using 3.22.32. Does this mean I am out of luck with >this query. > >Peter Schwenk wrote: > > > > If you are using version 3.23.x of MySQL, there is a LIMIT clause >that you can use > > to just update up to a certain number of records, so you could >add 'LIMIT 1' to the >

Re: How update 1 of two identical rows.

2001-04-09 Thread Richard Reina
Unfortunately I am using 3.22.32. Does this mean I am out of luck with this query. Peter Schwenk wrote: > > If you are using version 3.23.x of MySQL, there is a LIMIT clause that you can use > to just update up to a certain number of records, so you could add 'LIMIT 1' to the > UPDATE command t

Re: How update 1 of two identical rows.

2001-04-09 Thread Gerald Clark
Your table has no primary key. You have a badly malformed database. How can you tell one transaction from another? You have debit and credit amounts with no timestamp or account identifier. Add an autoincrement id field as a primary key. Then you can update based on that key. Richard Reina wrote

RE: How update 1 of two identical rows.

2001-04-09 Thread Ben Dimmock
delete from db where date="2001-04-09" and CR_amount=300.00 insert into from db (date, DB_amount, CR_amount) values ("2001-04-09", NULL, 300.00); insert into from db (date, DB_amount, CR_amount) values ("2001-04-09", NULL, 350.00); would change the 3rd to 350.00 credit. Unfortunately, there is n