Re: Update to Percona CVE-2016-6662 Vulnerability Communication

2016-09-15 Thread Reindl Harald
Am 16.09.2016 um 00:21 schrieb Johan De Meersman: - Original Message - From: "Reindl Harald" Sent: Friday, 16 September, 2016 00:12:26 frankly - mysqld_safe needs to go away and life is beautiful without for years here and yes taht worked for mysql too before

Re: Update to Percona CVE-2016-6662 Vulnerability Communication

2016-09-15 Thread Johan De Meersman
- Original Message - > From: "Reindl Harald" > Sent: Friday, 16 September, 2016 00:12:26 > > frankly - mysqld_safe needs to go away and life is beautiful without for > years here and yes taht worked for mysql too before switch to MariaDB > > to say it clear:

Re: Update to Percona CVE-2016-6662 Vulnerability Communication

2016-09-15 Thread Reindl Harald
Am 16.09.2016 um 00:05 schrieb Johan De Meersman: This is probably of interest to many of you, and I've not seen it on the list yet. Kenny Gryp's blog about the vulnerability is at https://www.percona.com/blog/2016/09/12/database-affected-cve-2016-6662/ . For those who use it, there's an

Re: update, insert ... gee.. a puzzle

2016-03-18 Thread Hal.sz S.ndor
2016/03/17 12:47 ... lejeczek: .. that you experts I hope can crack like a digestive biscuit... how does one update, or merge or whatever is right technical term for it - a my.table from my.another table (both are schematically identical, no foreign keys, one primary key) but.. does it a way

Re: update and control flow

2014-12-09 Thread wagnerbianchi.com
You can do that, but, perhaps the only chance to have it updating a row based on a condition is developing a Stored Procedure or even having a BEFORE Trigger associated with the main table. Those ways, you can test the sent value and decide on what UPDATE you will execute afterwards. Consider that

Re: update and control flow

2014-12-09 Thread Michael Dykman
​You can use your login inline with nested IF expressions: insert into foo(id,comment) values(17, IF(WORD like 'a%','a',IF(word like 'b%','b',null)));​ On Tue, Dec 9, 2014 at 9:50 AM, wagnerbianchi.com m...@wagnerbianchi.com wrote: You can do that, but, perhaps the only chance to have

Re: update and control flow

2014-12-09 Thread shawn l.green
Hello Martin, On 12/9/2014 9:25 AM, Martin Mueller wrote: I'm trying to get my feet wet with 'if' and 'when' uses in mysql. it would be very useful for update operations, but I can't get it right. If I read the documentation correctly, it should be possible to say something like UPDATE X if

Re: update and control flow

2014-12-09 Thread hsv
2014/12/09 14:25 +, Martin Mueller I'm trying to get my feet wet with 'if' and 'when' uses in mysql. it would be very useful for update operations, but I can't get it right. If I read the documentation correctly, it should be possible to say something like UPDATE X if WORD like 'a%' SET

Re: Update Column in table only if variable is Not NULL

2013-10-30 Thread Neil Tompkins
Shawn What I need is that if I pass say 10 parameters/variables to a query, I only want to update the column/field if the value passed is NOT NULL. On Wed, Oct 30, 2013 at 3:41 AM, Shawn Green shawn.l.gr...@oracle.comwrote: Hi, On 10/29/2013 9:52 PM, h...@tbbs.net wrote: 2013/10/29 11:35

Re: Update Column in table only if variable is Not NULL

2013-10-30 Thread Shawn Green
Hi Neil, On 10/30/2013 9:55 AM, Neil Tompkins wrote: Shawn What I need is that if I pass say 10 parameters/variables to a query, I only want to update the column/field if the value passed is NOT NULL. On Wed, Oct 30, 2013 at 3:41 AM, Shawn Green shawn.l.gr...@oracle.comwrote: Hi, On

Re: Update Column in table only if variable is Not NULL

2013-10-29 Thread Michael Dykman
Consider: update table1 set field1 = if( :var,:var,field1), ... Can be in a procedure but doesn't have to be. On Oct 28, 2013 5:28 PM, Neil Tompkins neil.tompk...@googlemail.com wrote: Hi Shawn Thanks for your reply. Maybe my example wasn't detailed enough. Basically the snippet of the

Re: Update Column in table only if variable is Not NULL

2013-10-29 Thread Shawn Green
Hello Neil, On 10/28/2013 5:23 PM, Neil Tompkins wrote: Hi Shawn Thanks for your reply. Maybe my example wasn't detailed enough. Basically the snippet of the UPDATE statement I provided shows updating only 1 field. However in my live working example, I have about 20 possible fields that

Re: Update Column in table only if variable is Not NULL

2013-10-29 Thread hsv
2013/10/28 21:23 +, Neil Tompkins Basically the snippet of the UPDATE statement I provided shows updating only 1 field. However in my live working example, I have about 20 possible fields that might need to be updated if the variable passed for each field is NOT NULL. Well, maybe

Re: Update Column in table only if variable is Not NULL

2013-10-29 Thread hsv
2013/10/29 11:35 -0400, Shawn Green My favorite technique is the COALESCE function for this on a column-by-column basis SET FieldName1 = Now(), FieldName2 = COALESCE(:MyVariable, FieldName2) but if MyVariable is NULL, FieldName1 reflects the attempt to change, not change. -- MySQL

Re: Update Column in table only if variable is Not NULL

2013-10-29 Thread Shawn Green
Hi, On 10/29/2013 9:52 PM, h...@tbbs.net wrote: 2013/10/29 11:35 -0400, Shawn Green My favorite technique is the COALESCE function for this on a column-by-column basis SET FieldName1 = Now(), FieldName2 = COALESCE(:MyVariable, FieldName2) but if MyVariable is NULL, FieldName1 reflects the

Re: Update Column in table only if variable is Not NULL

2013-10-28 Thread Andy Wallace
Try: update my_table set fieldname1 = Now(), Fieldname2 = :myVariable where Fieldname3 is not null On 10/28/13 11:06 AM, Neil Tompkins wrote: Hi If I have a update statement like UPDATE MY_TABLE SET FieldName1 = Now(), FieldName2 = :MyVariable WHERE FieldName3 = 'Y' How can I only update

Re: Update Column in table only if variable is Not NULL

2013-10-28 Thread Shawn Green
Hello Neil, On 10/28/2013 2:06 PM, Neil Tompkins wrote: Hi If I have a update statement like UPDATE MY_TABLE SET FieldName1 = Now(), FieldName2 = :MyVariable WHERE FieldName3 = 'Y' How can I only update the FieldName2 field if the value of MyVariable is NOT NULL ? Thanks Neil This needs

Re: Update Column in table only if variable is Not NULL

2013-10-28 Thread Neil Tompkins
Hi Shawn Thanks for your reply. Maybe my example wasn't detailed enough. Basically the snippet of the UPDATE statement I provided shows updating only 1 field. However in my live working example, I have about 20 possible fields that might need to be updated if the variable passed for each field

Re: Update just some of the fields

2013-06-17 Thread hsv
2013/06/17 11:38 +0430, Sayyed Mohammad Emami Razavi update test set desc='test10' where id=1; _That_ is UPDATE! It is the only means of changing, but neither inserting nor deleting, a record. The other fields are left the same. MySQL also tracks whether it is an actual change; this is

Re: update a row only if any column has changed, in a very large table

2013-04-08 Thread Andrés Tello
...@yahoo.com wrote: thx all, the source data is in text file. - Original Message - From: h...@tbbs.net h...@tbbs.net To: mysql list mysql@lists.mysql.com Cc: Sent: Saturday, April 6, 2013 8:02 PM Subject: Re: update a row only if any column has changed, in a very large table 2013

RE: Update and lock question.

2013-04-08 Thread Rick James
2:56 PM To: Urvashi Pathak Cc: mysql Subject: Re: Update and lock question. Thanks Urvashi. Based on your answer, instead of the data I looked into the index, and it appears that it was an index issue... I think I have nailed the wait lock contdition due a updating indexes unnecesarely

RE: update a row only if any column has changed, in a very large table

2013-04-06 Thread Jason Trebilcock
If'n it were my nickel, here is how I would solve the problem (at a somewhat high level). That is, assuming I had an ETL tool available. 1. Create landing tables for your source data. 2. Load data from the source table(s) to your new landing table(s). 3. Perform lookups from the new landing table

RE: Update and lock question.

2013-04-06 Thread Urvashi Pathak
Hi Andrés, Select for update makes sure that no other process can change the data between you selected it for update and then actually changed it and commit it. If you do not use select for update then it is possible that some other process can change the data in the mean time between you

Re: update a row only if any column has changed, in a very large table

2013-04-06 Thread hsv
2013/04/06 13:56 -0700, Rajeev Prasad I have a table with around 2,000,000 records (15 columns). I have to sync this from an outside source once every day. not all records are changed/removed /new-added everyday. so what is the best way to update only those which have changed/added/or

Re: update a row only if any column has changed, in a very large table

2013-04-06 Thread Rajeev Prasad
thx all, the source data is in text file. - Original Message - From: h...@tbbs.net h...@tbbs.net To: mysql list mysql@lists.mysql.com Cc: Sent: Saturday, April 6, 2013 8:02 PM Subject: Re: update a row only if any column has changed, in a very large table 2013/04/06 13:56 -0700

Re: Update and lock question.

2013-04-05 Thread Andrés Tello
Thanks Urvashi. Based on your answer, instead of the data I looked into the index, and it appears that it was an index issue... I think I have nailed the wait lock contdition due a updating indexes unnecesarely... On Thu, Apr 4, 2013 at 10:52 AM, Urvashi Pathak urvashi_pat...@symantec.com

Re: Update One of Three tables in a single query

2012-11-29 Thread Andrew Moore
What's your use case? I've not heard of a like this done at table/sql level. You could use stored procedures dynamic SQL to achieve it though. On Thu, Nov 29, 2012 at 5:44 PM, Chris W 4rfv...@cox.net wrote: I have three tables, TableA, TableB, and TableC each has a unique ID field, idA,

RE: Update One of Three tables in a single query

2012-11-29 Thread Rick James
Some combo of IN, EXISTS, UNION? It will probably be verbose. -Original Message- From: Andrew Moore [mailto:eroomy...@gmail.com] Sent: Thursday, November 29, 2012 11:32 AM To: Chris W Cc: MYSQL General List Subject: Re: Update One of Three tables in a single query What's your

Re: update doesn't

2012-08-20 Thread Mogens Melander
On Sun, August 19, 2012 18:19, william drescher wrote: On 8/17/2012 12:13 PM, Rik Wasmus wrote: I get 1 row affected, but the status does not change when I look at the row. If I set it to 'X' it does change. To make it even more wacky, if I (using phpMyAdmin) change it to 'H' it will

Re: update doesn't

2012-08-20 Thread william drescher
On 8/20/2012 10:09 AM, Mogens Melander wrote: On Sun, August 19, 2012 18:19, william drescher wrote: On 8/17/2012 12:13 PM, Rik Wasmus wrote: I get 1 row affected, but the status does not change when I look at the row. If I set it to 'X' it does change. To make it even more wacky, if I

Re: update doesn't

2012-08-19 Thread william drescher
On 8/17/2012 12:13 PM, Rik Wasmus wrote: I get 1 row affected, but the status does not change when I look at the row. If I set it to 'X' it does change. To make it even more wacky, if I (using phpMyAdmin) change it to 'H' it will change and the row is shown change, but when I go to examine the

Re: update doesn't

2012-08-19 Thread Johnny Withers
The client indicates a warning after the update. Issue a show warnings after the update. On Aug 19, 2012 11:19 AM, william drescher will...@techservsys.com wrote: On 8/17/2012 12:13 PM, Rik Wasmus wrote: I get 1 row affected, but the status does not change when I look at the row. If I set

Re: update doesn't

2012-08-19 Thread william drescher
On 8/19/2012 1:25 PM, Johnny Withers wrote: The client indicates a warning after the update. Issue a show warnings after the update. actually, it doesn't. but I did a show warnings and it replied: Empty Set (0.00 sec) I also did a show triggers and it replied: Empty Set (0.00 sec) On Aug 19,

Re: update doesn't

2012-08-19 Thread william drescher
On 8/19/2012 5:56 PM, william drescher wrote: mysql select status from tasks; ++ | status | ++ | W | ++ 1 row in set (0.00 sec) mysql update tasks set status= 'H'; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed 1 Warnings: 0 mysql select status

Re: update doesn't

2012-08-17 Thread Rik Wasmus
I get 1 row affected, but the status does not change when I look at the row. If I set it to 'X' it does change. To make it even more wacky, if I (using phpMyAdmin) change it to 'H' it will change and the row is shown change, but when I go to examine the row (using the pencil icon=Edit)

Re: update query

2012-04-30 Thread Ananda Kumar
Do you just want to replace current value in client column to NEW. You can write a stored proc , with a cursor and loop through the cursor, update each table. regards anandkl On Mon, Apr 30, 2012 at 2:47 PM, Pothanaboyina Trimurthy skd.trimur...@gmail.com wrote: Hi all, i have one

RE: update query

2012-04-30 Thread Rick James
= 'dbname' information_schema.COLUMNS WHERE COLUMN_NAME = 'client' -Original Message- From: Ananda Kumar [mailto:anan...@gmail.com] Sent: Monday, April 30, 2012 2:26 AM To: Pothanaboyina Trimurthy Cc: mysql@lists.mysql.com Subject: Re: update query Do you just want to replace

Re: UPDATE triggers with REPLACE statements

2012-01-23 Thread Hal�sz S�ndor
; 20111219 03:42 PM -0800, Jim McNeely Not if you are using innoDB tables. For these, you use INSERT and UPDATE triggers. Jim McNeely On Dec 19, 2011, at 11:58 AM, Halász Sándor wrote: 2011/12/19 11:30 -0800, Jim McNeely In the MySQL documentation, we find this tantalizing statement: It

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Jim McNeely
Perfect!! This is the answer I was looking for. Thanks! I didn't know about this. Jim McNeely On Dec 18, 2011, at 11:26 AM, Claudio Nanni wrote: Only if you can change the application you could use INSERTON DUPLICATE KEY UPDATE instead of REPLACE. Check Peter's post here:

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Jim McNeely
In the MySQL documentation, we find this tantalizing statement: It is possible that in the case of a duplicate-key error, a storage engine may perform the REPLACE as an update rather than a delete plus insert, but the semantics are the same. There are no user-visible effects other than a

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Claudio Nanni
Good to know and good that you took time to read the manual, good approach. But why bother with REPLACE if you will go with INSERT.ON DUPLICATE KEY UPDATE? The storage engine is a property of your table and you can set it and/or change it, it is the low-level layer (physical) of the database

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Jim McNeely
With REPLACE, you just set up the query the same as an INSERT statement but otherwise it just works. With ON DUPLICATE UPDATE you have to set up the whole query with the entire text all over again as an update. The query strings for what I'm doing are in some cases pushing enough text in

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Hal�sz S�ndor
2011/12/19 11:30 -0800, Jim McNeely In the MySQL documentation, we find this tantalizing statement: It is possible that in the case of a duplicate-key error, a storage engine may perform the REPLACE as an update rather than a delete plus insert, but the semantics are the same. There are no

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Jim McNeely
Not if you are using innoDB tables. For these, you use INSERT and UPDATE triggers. Jim McNeely On Dec 19, 2011, at 11:58 AM, Halász Sándor wrote: 2011/12/19 11:30 -0800, Jim McNeely In the MySQL documentation, we find this tantalizing statement: It is possible that in the case of a

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Hal�sz S�ndor
2011/12/19 13:55 -0800, Jim McNeely Anyway, I just thought I would share. BTW I experimented, and innoDB does updates and fires off update triggers for REPLACE statements, but MyISAM does delete/inserts. Thank you. Which version? Well, then the documentation is wrong: it is indeed visible

Re: UPDATE triggers with REPLACE statements

2011-12-18 Thread Claudio Nanni
Only if you can change the application you could use INSERTON DUPLICATE KEY UPDATE instead of REPLACE. Check Peter's post here: http://kae.li/iiigi Cheers Claudio 2011/12/17 Jim McNeely j...@newcenturydata.com Here is a fun one! I have a set of tables that get populated and changed a

Re: UPDATE triggers with REPLACE statements

2011-12-17 Thread Hal�sz S�ndor
2011/12/16 16:00 -0800, Jim McNeely I have a set of tables that get populated and changed a lot from lots of REPLACE statements. Now, I need an ON UPDATE trigger, but of course the trigger never gets triggered because REPLACES are all deletes and inserts. The trigger is going to populate

Re: UPDATE with variable

2011-11-28 Thread Johan De Meersman
- Original Message - From: Halász Sándor h...@tbbs.net mysql update address set membersince = (select membersince from address where memberid = 1258) where memberid = 1724; IIRC, subselects are allowed, except for selects that reference the table you're updating. -- Bier met

Re: Update table on lost connection

2011-09-28 Thread Hank
Check out the GET_LOCK and RELEASE_LOCK virtual lock functions in MySQL. -Hank On Wed, Sep 28, 2011 at 9:15 AM, Alex Schaft al...@quicksoftware.co.za wrote: Hi, We're busy moving legacy apps from foxpro tables to mysql. User logins were tracked via a record in a table which the app then

Re: Update on inner join - looks good to me, where did I go wrong?

2011-09-10 Thread Dotan Cohen
On Sat, Sep 10, 2011 at 01:48, Carsten Pedersen cars...@bitbybit.dk wrote: `userTable.userid` = `userTable`.`userid` Thank you Carsten. That was indeed the problem! Have a peaceful weekend. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- MySQL General Mailing List For list

Re: Update on inner join - looks good to me, where did I go wrong?

2011-09-09 Thread Dotan Cohen
Now that I've got the syntax right, MySQL is complaining that a field does not exist, which most certainly does: mysql UPDATE - `userTable` - INNER JOIN `anotherTable` - ON `userTable.userid`=`anotherTable.userid` - SET `userTable.someField`=Jimmy Page - WHERE

Re: Update on inner join - looks good to me, where did I go wrong?

2011-09-09 Thread Carsten Pedersen
`userTable.userid` = `userTable`.`userid` / Carsten On 09-09-2011 23:01, Dotan Cohen wrote: Now that I've got the syntax right, MySQL is complaining that a field does not exist, which most certainly does: mysql UPDATE - `userTable` - INNER JOIN `anotherTable` -ON

Re: update and times

2010-10-07 Thread Simcha Younger
On Wed, 06 Oct 2010 17:48:55 -0400 kalin m ka...@el.net wrote: Simcha Younger wrote: executing this query didn't update the record. why? The two values you have here are equal: sample data : 12862162510269684 query: where unix_time 12862162510269684

Re: update and times

2010-10-06 Thread kalin m
Simcha Younger wrote: On Mon, 04 Oct 2010 16:11:08 -0400 kalin m ka...@el.net wrote: what i'm trying to do is update the column only of one of those times isn't yet passed. and it works. except sometimes... like these 2 unix times: this was in the table under unix time:

Re: update and times

2010-10-05 Thread Simcha Younger
On Mon, 04 Oct 2010 16:11:08 -0400 kalin m ka...@el.net wrote: what i'm trying to do is update the column only of one of those times isn't yet passed. and it works. except sometimes... like these 2 unix times: this was in the table under unix time: 12862162385941345... this

RE: update and times

2010-10-04 Thread Gavin Towey
Those unix_time values don't seem to correspond to the dates you have. select NOW(), UNIX_TIMESTAMP(NOW()); +-+---+ | NOW() | UNIX_TIMESTAMP(NOW()) | +-+---+ | 2010-10-04 13:18:08 |1286223488

Re: update and times

2010-10-04 Thread kalin m
right the unix times in the example table were just that - examples from a few days ago... the example with the query was a 'real one' something that happened today... it's a 64 bit machine. the unix times are stored in a bigint column. the times in the column and the update

Re: Update Table

2010-09-27 Thread Nigel Wood
On Mon, 2010-09-27 at 11:25 +0100, Willy Mularto wrote: Hi, I work on MySQL 5 with PHP 5 and use Apache 2 as the webserver. I have a simple query that searches matched row id and update the field via HTTP GET query. On a low load it succeed update the row. But on high traffic sometimes it

Re: Update record count

2010-09-17 Thread Johan De Meersman
On Fri, Sep 17, 2010 at 3:51 AM, Shawn Green (MySQL) shawn.l.gr...@oracle.com wrote: So if 10 rows of A match your conditions, 1 row from B match your conditions, and 10 rows from C match your conditions, then this query produces 10*1*10 total row combinations. Umm. It's friday, so I may

RE: Update record count

2010-09-17 Thread Jerry Schwartz
-Original Message- From: Shawn Green (MySQL) [mailto:shawn.l.gr...@oracle.com] Sent: Thursday, September 16, 2010 9:51 PM To: Jerry Schwartz Cc: mysql@lists.mysql.com Subject: Re: Update record count On 9/16/2010 5:12 PM, Jerry Schwartz wrote: I should be able to figure this out, but I'm

RE: Update query problem

2010-09-16 Thread Travis Ard
Try using the IS NULL operator instead of ! -Travis -Original Message- From: Andy Wallace [mailto:awall...@ihouseweb.com] Sent: Thursday, September 16, 2010 10:47 AM To: mysql@lists.mysql.com Subject: Update query problem So I'm having a problem with an update query. I have three

Re: Update record count

2010-09-16 Thread Shawn Green (MySQL)
On 9/16/2010 5:12 PM, Jerry Schwartz wrote: I should be able to figure this out, but I'm puzzled. Here's a simplified example: UPDATE a JOIN b ON a.kb = b.kb JOIN c ON b.kc = c.kc SET a.f1 = NOW(), b.f2 = NOW() WHERE c.f3 IN ('x', 'y', 'z') AND b.f4 = 'yen'; It seems to me that if there are

Re: update replace() regex

2010-07-08 Thread Dan Nelson
In the last episode (Jul 08), Egor Shevtsov said: I wonder if possible at all to use replace() together with regex in update statement. I want to be able to update a field of string values and replace a 'dash' character with a space in the string. Something like: UPDATE table SET column =

Re: update replace() regex

2010-07-08 Thread Egor Shevtsov
Thanks Dan, I tested it just now. It works perfectly. Dan Nelson wrote: In the last episode (Jul 08), Egor Shevtsov said: I wonder if possible at all to use replace() together with regex in update statement. I want to be able to update a field of string values and replace a 'dash'

Re: UPDATE and simultaneous SELECT ... similar to RETURNING?

2009-12-25 Thread Baron Schwartz
Dante, On Tue, Dec 22, 2009 at 3:53 PM, Dante Lorenso da...@lorenso.com wrote: All, There was a feature of another DB that I have grown extremely accustomed to and would like to find the equivalent in MySQL: UPDATE mytable SET mycolumn = mycolumn + 1 WHERE mykey = 'dante' RETURNING

Re: Update Doesn't Update!

2009-12-11 Thread carsten
On Fri, 11 Dec 2009 04:38:01 -0500, Victor Subervi victorsube...@gmail.com wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 1 Warnings: 1 do a SHOW WARNINGS

Re: Update Doesn't Update!

2009-12-11 Thread Jørn Dahl-Stamnes
On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 1 Look at the message, 0 rows changed

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 4:48 AM, Jørn Dahl-Stamnes sq...@dahl-stamnes.netwrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 4:48 AM, Jørn Dahl-Stamnes sq...@dahl-stamnes.netwrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0

Re: Update Doesn't Update!

2009-12-11 Thread Martijn Tonies
mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 1 Look at the message, 0 rows changed and 1 warning. You cannot have ID=0 if ID is an index. Are you

RE: Update Doesn't Update!

2009-12-11 Thread misiaQ
[mailto:victorsube...@gmail.com] Sent: 11 December 2009 10:06 Cc: mysql@lists.mysql.com Subject: Re: Update Doesn't Update! On Fri, Dec 11, 2009 at 4:48 AM, Jørn Dahl-Stamnes sq...@dahl-stamnes.netwrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 4:43 AM, cars...@bitbybit.dk wrote: On Fri, 11 Dec 2009 04:38:01 -0500, Victor Subervi victorsube...@gmail.com wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed:

Re: Update Doesn't Update!

2009-12-11 Thread carsten
On Fri, 11 Dec 2009 10:48:59 +0100, Jørn Dahl-Stamnes sq...@dahl-stamnes.net wrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0

Re: Update Doesn't Update!

2009-12-11 Thread carsten
On Fri, 11 Dec 2009 05:09:52 -0500, Victor Subervi victorsube...@gmail.com wrote: mysql update products set sizes=('Small', 'Large') where SKU='prodSKU1'; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 1 mysql show warnings;

Re: Update Doesn't Update!

2009-12-11 Thread Mark Goodge
Jørn Dahl-Stamnes wrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 1 Look at the

Re: Update Doesn't Update!

2009-12-11 Thread Yang Wang
@lists.mysql.com Sent: Friday, December 11, 2009 6:13 PM Subject: Re: Update Doesn't Update! On Fri, 11 Dec 2009 05:09:52 -0500, Victor Subervi victorsube...@gmail.com wrote: mysql update products set sizes=('Small', 'Large') where SKU='prodSKU1'; Query OK, 0 rows affected, 1 warning (0.00

Re: Update Doesn't Update!

2009-12-11 Thread Chris Knipe
Quoting cars...@bitbybit.dk: Of course you can have ID=0. Definately agree mysql DESCRIBE test; +-+-+--+-+-++ | Field | Type| Null | Key | Default | Extra |

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 5:13 AM, cars...@bitbybit.dk wrote: On Fri, 11 Dec 2009 05:09:52 -0500, Victor Subervi victorsube...@gmail.com wrote: mysql update products set sizes=('Small', 'Large') where SKU='prodSKU1'; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1

Re: Update Doesn't Update!

2009-12-11 Thread carsten
On Fri, 11 Dec 2009 05:28:41 -0500, Victor Subervi victorsube...@gmail.com wrote: On Fri, Dec 11, 2009 at 5:13 AM, cars...@bitbybit.dk wrote: On Fri, 11 Dec 2009 05:09:52 -0500, Victor Subervi victorsube...@gmail.com wrote: mysql update products set sizes=('Small', 'Large')

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 5:33 AM, cars...@bitbybit.dk wrote: On Fri, 11 Dec 2009 05:28:41 -0500, Victor Subervi victorsube...@gmail.com wrote: On Fri, Dec 11, 2009 at 5:13 AM, cars...@bitbybit.dk wrote: On Fri, 11 Dec 2009 05:09:52 -0500, Victor Subervi victorsube...@gmail.com

Re: Update Doesn't Update!

2009-12-11 Thread Johan De Meersman
On Fri, Dec 11, 2009 at 11:19 AM, Mark Goodge m...@good-stuff.co.uk wrote: Jørn Dahl-Stamnes wrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 8:43 AM, Johan De Meersman vegiv...@tuxera.bewrote: On Fri, Dec 11, 2009 at 11:19 AM, Mark Goodge m...@good-stuff.co.uk wrote: Jørn Dahl-Stamnes wrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small',

Re: Update Doesn't Update!

2009-12-11 Thread Johan De Meersman
On Fri, Dec 11, 2009 at 6:40 PM, Victor Subervi victorsube...@gmail.comwrote: I'm lost. I set up this database originally with auto_increment and the first value was 0. I thought that was always the case. Is there a problem here? Yes, that should not have happened. For autoincrement fields,

Re: update fields with a prefix - ?? how to

2009-10-19 Thread Johan De Meersman
Something in the ilk of update *table* set *field* = concat(prefix_, *field*) where *condition * should do the trick. On Mon, Oct 19, 2009 at 4:56 PM, lejeczek pelj...@yahoo.co.uk wrote: dear all, a novice here quickie regarding query syntax - is it possible to take fields values from one

Re: update client

2009-08-23 Thread Walter Heck - OlinData.com
Check out replication. On Sun, Aug 23, 2009 at 09:00, m. zamil mza...@saudi.net.sa wrote: Hello all, due to connection state, I need to keep an updated copy of the database on the client. How can I accomplish this? TIA Mos -- Walter Heck, Engineer @ Open Query (http://openquery.com)

Re: Update Syntax

2009-07-26 Thread Michael Dykman
from: http://dev.mysql.com/doc/refman/5.1/en/insert.html: INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name SET col_name={expr | DEFAULT}, ... [ ON DUPLICATE KEY UPDATE col_name=expr [, col_name=expr] ... ] The ON DUPLICATE KEY predicate tells

Re: Update Syntax

2009-07-26 Thread Darryle Steplight
Hi Vicor, Look into INSERT ON DUPLICATE or REPLACE statements. You need to have a primary key or unique key for these too work. On Sun, Jul 26, 2009 at 1:11 PM, Victor Subervivictorsube...@gmail.com wrote: Hi; I would like to test the following: update maps set map where site=mysite; to

Re: Update Syntax

2009-07-26 Thread Victor Subervi
Perfect. Thank you. Victor On Sun, Jul 26, 2009 at 2:18 PM, Darryle Steplight dstepli...@gmail.comwrote: Hi Vicor, Look into INSERT ON DUPLICATE or REPLACE statements. You need to have a primary key or unique key for these too work. On Sun, Jul 26, 2009 at 1:11 PM, Victor

RE: Update email address domain

2009-06-29 Thread Nathan Sullivan
John, I think this should work: UPDATE members SET email=REPLACE(email, SUBSTRING(email,INSTR(email,'@')+1), 'Thanks_in_advance.com.com') Regards, Nathan -Original Message- From: John Furlong [mailto:john.furl...@rakutenusa.com] Sent: Monday, June 29, 2009 12:54 PM To:

RE: Update email address domain

2009-06-29 Thread John Furlong
Nathan, That was exactly what I was looking for, thanks for your help. John -Original Message- From: Nathan Sullivan [mailto:nsulli...@cappex.com] Sent: Monday, June 29, 2009 2:55 PM To: John Furlong; mysql@lists.mysql.com Subject: RE: Update email address domain John, I think

Re: Update with value form another table

2009-05-22 Thread Perrin Harkins
On Fri, May 22, 2009 at 1:22 PM, Chris W 4rfv...@cox.net wrote: Of course study to profile is a one to many relationship.  How do I run an update to set  p.`Date` equal to s.`Date`? This is covered in the docs for UPDATE. Read that and come back if you're stuck. - Perrin -- MySQL General

Re: UPDATE ... where max(datecolumn)

2009-01-31 Thread Baron Schwartz
Is there ever more than one order per day? I also think you might mean most current order per product, but you didn't say that. On Tue, Jan 27, 2009 at 8:38 AM, Adria Stembridge adrya.stembri...@gmail.com wrote: I have a table like this: ID PRODUCT DATEORDERED 15

Re: UPDATE jujitsu?

2009-01-08 Thread Jim Lyons
How about this? update t set onoffflag = if (name 'China', onoffflag, ( if (location = 'Table', 1, 0) )); This leaves any onoffflag untouched if name is not China, which I assume you wanted to do. On Thu, Jan 8, 2009 at 2:18 PM, Christoph Boget christoph.bo...@gmail.comwrote: Consider

Re: Update Problem when ORing w/ Long.MIN_VALUE

2008-11-26 Thread Daniel Doubleday
For the curious: As usual select is not broken. Lesson learned: Always watch out for warnings: http://bugs.mysql.com/bug.php?id=41007 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Update Problem when ORing w/ Long.MIN_VALUE

2008-11-25 Thread Daniel Doubleday
Hi Gautam nope yours is not a bug. That's all fine. Hex numbers are 64 bit unsigned. So for -1 you have to insert cast(0x as signed). Cheers, Daniel Hi Daniel, I can see the problem without using update. However, I am a newbie at mysql, so can't say for certain if it's

Re: Update Problem when ORing w/ Long.MIN_VALUE

2008-11-24 Thread Gautam Gopalakrishnan
Hi Daniel, I can see the problem without using update. However, I am a newbie at mysql, so can't say for certain if it's a bug: mysql drop table if exists foo; mysql create table foo (id int signed, val bigint signed); mysql insert into foo values (0x, 0x), (-1, -1);

Re: UPDATE rows based on multiple WHERE values?

2008-07-18 Thread Waynn Lue
Thanks, I'll take a look at that. Appreciate the help, Waynn On Sat, Jul 12, 2008 at 9:02 PM, Rob Wultsch [EMAIL PROTECTED] wrote: On Sat, Jul 12, 2008 at 8:01 PM, Waynn Lue [EMAIL PROTECTED] wrote: Is there any way to have an UPDATE statement change a column value based on the WHERE

Re: Update replace / Operand should contain 1 column(s) 1241

2008-07-15 Thread Rob Wultsch
On Tue, Jul 15, 2008 at 7:59 AM, Guenter Ladstaetter [EMAIL PROTECTED] wrote: UPDATE `phpbt_bug` SET title = REPLACE (phpbt_bug.title,ö,ö) WHERE bug_id IN (select bug_id, title from phpbt_bug where `title` LIKE %ö%); The error message is: Operand should contain 1 column(s) 1241 You have

Re: UPDATE rows based on multiple WHERE values?

2008-07-12 Thread Rob Wultsch
On Sat, Jul 12, 2008 at 8:01 PM, Waynn Lue [EMAIL PROTECTED] wrote: Is there any way to have an UPDATE statement change a column value based on the WHERE statement? Essentially, I want to do something like this UPDATE Actions SET ActionsSent = foo WHERE ActionsReceived = bar where foo and

RE: Update with select

2008-05-02 Thread Rolando Edwards
You are better off with an UPDATE JOIN UPDATE pdata A,pdata B SET A.pvalue = B.pvalue WHERE A.pentrytime = 117540 AND B.pentrytime = 1207022400; Give it a try !!! -Original Message- From: Albert E. Whale [mailto:[EMAIL PROTECTED] Sent: Friday, May 02, 2008 4:06 PM To:

  1   2   3   4   5   6   >