RE: update query

2012-04-30 Thread Rick James
CHEMA = '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

回复: update query

2012-04-30 Thread Zhangzhigang
u username  -e "use database;update $i set client='NEW'"     fi     let c=$c+1 done 发件人: Ananda Kumar 收件人: Pothanaboyina Trimurthy 抄送: mysql@lists.mysql.com 发送日期: 2012年4月30日, 星期一, 下午 5:26 主题: Re: update query Do you just want to replace

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

update query

2012-04-30 Thread Pothanaboyina Trimurthy
Hi all, i have one database with 120 tables and each table contains one common column that is "client" now i want to update all the tables column client = "NEW". is it possible to write a single query to update this one. please help me. thanks in advance Thanks & Kind Regards, Trimurthy.p

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

Update query problem

2010-09-16 Thread Andy Wallace
So I'm having a problem with an update query. I have three tables: Table: A Columns: acnt, name, company, email, domain Table: AM Columns: acnt, m_id Table: M Columns: m_id, name, company, email, domain and I want to conditionally update the columns in one to values from the other

Re: Speeding up a pretty simple correlated update query

2009-09-06 Thread Hank
On Sun, Sep 6, 2009 at 6:01 PM, mos wrote: > > So I've disabled all the keys on the "item_trans" table -- since I am >> updating every row, it wouldn't (shouldn't) be using the index anyway. >> > > You can't disable unique indexes or primary keys. They are always active. > You can only deactivat

Re: Speeding up a pretty simple correlated update query

2009-09-06 Thread mos
will not take 9 days to complete! :-) Mike At 12:32 PM 9/6/2009, Hank wrote: Hello All, I'm reposting this since I didn't get much response the last time, so I'm hoping to reach out again. My correlated update query (see below) was running for 9 days before I killed it. Here i

Re: Speeding up a pretty simple correlated update query

2009-09-06 Thread Hank
Hello All, I'm reposting this since I didn't get much response the last time, so I'm hoping to reach out again. My correlated update query (see below) was running for 9 days before I killed it. Here is my original question: I have a legacy application which was written u

Re: Speeding up a pretty simple correlated update query

2009-09-02 Thread Hank
te the values on another table and update with a > join. > > Regards, > Gavin Towey > > -Original Message- > From: Hank [mailto:hes...@gmail.com] > Sent: Wednesday, September 02, 2009 4:35 PM > To: mysql@lists.mysql.com > Subject: Speeding up a pretty

RE: Speeding up a pretty simple correlated update query

2009-09-02 Thread Gavin Towey
o:hes...@gmail.com] Sent: Wednesday, September 02, 2009 4:35 PM To: mysql@lists.mysql.com Subject: Speeding up a pretty simple correlated update query Hello All, I have a legacy application which was written using a compound primary key of an item number (non unique) along with a category ID

Speeding up a pretty simple correlated update query

2009-09-02 Thread Hank
I want to update the main transaction table with the new sequence number. So I've disabled all the keys on the "item_trans" table -- since I am updating every row, it wouldn't (shouldn't) be using the index anyway. Here is my correlated update query: update item_trans i, i

Re: Mysql update query gives error of lock wait timeout

2009-08-29 Thread Krishna Chandra Prajapati
Increase your Innodb_buffer_pool_size. It will solve your problem. Thanks, Krishna On Sat, Aug 29, 2009 at 10:39 AM, Manasi Save < manasi.s...@artificialmachines.com> wrote: > Hi All, > > I have a query which gives an error of lock wait timeout only this > transaction is running with 2 recor

Re: Mysql update query gives error of lock wait timeout

2009-08-28 Thread Manasi Save
Hi, You are right. The storage engine i m using is InnoDB. but then my concern is why this simple update query takes so long. Is it true that if its innodb table then even after specifying where condition it scans all indexed rows. I am bit confused as mysql.com have mentioned on there site that

Re: Mysql update query gives error of lock wait timeout

2009-08-28 Thread muhammad subair
On Sat, Aug 29, 2009 at 12:09 PM, Manasi Save < manasi.s...@artificialmachines.com> wrote: > Hi All, > > I have a query which gives an error of lock wait timeout only this > transaction is running with 2 records in the table. > > The query is : > > Update Test > Set TestFlag = 1 > Where TestID

Mysql update query gives error of lock wait timeout

2009-08-28 Thread Manasi Save
Hi All, I have a query which gives an error of lock wait timeout only this transaction is running with 2 records in the table. The query is : Update Test Set TestFlag = 1 Where TestID = 5; Can this one transaction lock my entire table? -- Thanks and Regards, Manasi Save Artificial Machines

Re: Error 1064 on a basic UPDATE query

2007-10-15 Thread Baron Schwartz
Hi, James Graham wrote: Hi List, We have a transactions table (~600k records). I'm trying a simple update query, it fails. I thought this could be due to a reserved word problem, but all names have been escaped. mysql> UPDATE `tblTransaction` SET `TYPE` = 'Manual

Error 1064 on a basic UPDATE query

2007-10-15 Thread James Graham
Hi List, We have a transactions table (~600k records). I'm trying a simple update query, it fails. I thought this could be due to a reserved word problem, but all names have been escaped. mysql> UPDATE `tblTransaction` SET `TYPE` = 'Manual' WHERE (`ORDERID` = '694215576

Re: Update query question

2007-02-02 Thread ViSolve DB Team
Hi,, The Update query of yours will do fine.. otherwise try using string functions [instr()] like mysql> update inventory_items set name='necklace' where instr(description,'necklace')>0; Thanks ViSolve DB Team. - Original Message - From: "Jerry Jones&

Update query question

2007-02-02 Thread Jerry Jones
I am new to mysql. I am trying to do a simple update query to update a field based on the contents of another field in the same table. Here is what I have. update inventory_items set name = "necklace" where description like "%necklace%"; I am not sure what is wrong. select *

Re: Update query help

2006-12-06 Thread Remo Tex
Ravi Kumar. wrote: Dear Friends, I have two tables: T1, T2. T1 has 3 columns: playerid, gameid, score T2 has 2 columns: playerid, totalscore. I wish to update table T2 such that sum of T1.score of each player, gets updated in T2.totalscore. It may be something like this: update T2, T1 s

Re: Update query help

2006-12-06 Thread Remo Tex
day, December 06, 2006 4:11 PM Subject: Update query help Dear Friends, I have two tables: T1, T2. T1 has 3 columns: playerid, gameid, score T2 has 2 columns: playerid, totalscore. I wish to update table T2 such that sum of T1.score of each player, gets updated in T2.totalscore. It may be som

Re: Update query help

2006-12-06 Thread ViSolve DB Team
4:11 PM Subject: Update query help Dear Friends, I have two tables: T1, T2. T1 has 3 columns: playerid, gameid, score T2 has 2 columns: playerid, totalscore. I wish to update table T2 such that sum of T1.score of each player, gets updated in T2.totalscore. It may be something like this: upda

Update query help

2006-12-06 Thread Ravi Kumar.
Dear Friends, I have two tables: T1, T2. T1 has 3 columns: playerid, gameid, score T2 has 2 columns: playerid, totalscore. I wish to update table T2 such that sum of T1.score of each player, gets updated in T2.totalscore. It may be something like this: update T2, T1 set T2.totalscore = sum(

RE: Update query in order to modify some fields

2006-11-17 Thread Jerry Schwartz
Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 > -Original Message- > From: spacemarc [mailto:[EMAIL PROTECTED] > Sent: Friday, November 17, 2006 9:27 AM > To: Mike Kruckenberg > Cc: mysql@lists.mysql.com > Subject: Re: Update query

Re: Update query in order to modify some fields

2006-11-17 Thread spacemarc
ct replace("the-object1","the","an"); +---+ | replace("the-object1","the","an") | +---+ | an-object1| +-------+ 1 row in set (0.09 sec) ok. I will us

Update query in order to modify some fields

2006-11-17 Thread spacemarc
Hi I have more fields with values as the-object1 the-object2 the-object45 I must to change only the part begins them to other words, example: "the-object2" must become "an-object2" Which syntax I can use? Thanks in advance -- http://www.spacemarc.it -- MySQL General Mailing List For lis

Re: help with update query

2006-10-16 Thread Ferindo Middleton
r table. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 > -Original Message- > From: Ferindo Middleton [mailto:[EMAIL PROTECTED] > Sent: Saturday, October 14, 2006 9:16 PM > To: Dan Buettner > Cc: my

RE: help with update query

2006-10-16 Thread Jerry Schwartz
ble. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 > -Original Message- > From: Ferindo Middleton [mailto:[EMAIL PROTECTED] > Sent: Saturday, October 14, 2006 9:16 PM > To: Dan Buettner > Cc

Re: Re: help with update query

2006-10-14 Thread Dan Buettner
Good call on the WHERE email_address IS NULL thing. Also occurs to me you could do a SELECT DISTINCT instead of just a SELECT to eliminate duplicate update commands. Glad this was useful. Dan On 10/14/06, Ferindo Middleton <[EMAIL PROTECTED]> wrote: Thanks Dan. This does help. This a pretty

Re: help with update query

2006-10-14 Thread Ferindo Middleton
Thanks Dan. This does help. This a pretty straight-forward idea. I could even save the results of this query to a text file and possibly review it a little before running it so I don't acidentally do anything funky and I could see the impact this would have on the data before applying it. I think

Re: help with update query

2006-10-14 Thread Dan Buettner
Ferindo, I had a similar task recently, and the problem you'll run into is that you can't select from and update the same table at once. What I ended up doing was doing a SELECT to build the update queries for me. Something like this: SELECT CONCAT( "UPDATE bowler_score SET email_address = '", em

help with update query

2006-10-13 Thread Ferindo Middleton
I have a table, bowler_score_records, with the following columns: id, firstname, middlename, lastname, race, religion, email_address, bowling_score, gamedate As records get entered to this table, sometimes the users forget to input the email_address but the users always capture the full name, r

Re: Need Update Query Help (Urgent)

2006-02-20 Thread Peter Brawley
I wrote this below Query but it shows error how to write UPDATE table_1 SET col_3 = 'bbb' WHERE col_1 = (SELECT max(col_1) FROM table_1) See the docs for Update at http://dev.mysql.com/doc/refman/5.0/en/update.html. You cannot refer to the update table in a subquery. PB - Veerabhad

Re: Need Update Query Help (Urgent)

2006-02-20 Thread Jeff Shapiro
On Monday 20 February 2006 03:27, Veerabhadrarao Narra wrote: > Hi > > i ahve one table table_1 and columns like col_1,col_2,col_3 > > col_1 col_2 col_3 > 1 aa aaa > 2 bb > > Now i want to update my table table_1 SET col_3 as bbb where max of col_1 > > I wrote thi

Need Update Query Help (Urgent)

2006-02-20 Thread Veerabhadrarao Narra
Hi i ahve one table table_1 and columns like col_1,col_2,col_3 col_1 col_2 col_3 1 aa aaa 2 bb Now i want to update my table table_1 SET col_3 as bbb where max of col_1 I wrote this below Query but it shows error how to write UPDATE table_1 SET col_3 = 'bbb'

Re: Update query

2006-01-24 Thread Jørn Dahl-Stamnes
On Tuesday 24 January 2006 12:03, Gleb Paharenko wrote: > Hello. > > If dbA.id has the format you have specified MySQL should be able to > silently convert the type from char to int, and you can work with dbA.id > as it is integer column. > > > mysql> create table ch(id char(6)); > Query OK, 0 rows

Re: Update query

2006-01-24 Thread Gleb Paharenko
> bar int > > Both tables has a several records with identical ID values, but the format is > different ('001234' vs 1234). > > Is it possible to create a update query that copies the 'foo' and 'bar' from > table dbA.A to dbB.B for each record

Update query

2006-01-24 Thread Jørn Dahl-Stamnes
values, but the format is different ('001234' vs 1234). Is it possible to create a update query that copies the 'foo' and 'bar' from table dbA.A to dbB.B for each record in dbB.B? -- Jørn Dahl-Stamnes homepage: http://www.dahl-stamnes.net/dahls/ -- MySQL General

Update query to set random data

2005-07-01 Thread zzapper
Hi, In order to generate some useful test data eg randomnly setting the flag select_normal to 0 or 1 use the following update tbl_products set select_normal=round(rand()); I've actually answered my own question (as usual in formulating the question you often can workout the answer) But anyone

Re: Subselect in an Update query

2005-06-18 Thread Jochem van Dieten
On 6/17/05, [EMAIL PROTECTED] wrote: > > There is one caveat: It is not currently possible to modify a table and select > from the same table in a subquery. That is not the only problem: there is no guarantee the subquery will only return one record. So even if MySQL wouldn't have this limitation

Re: Subselect in an Update query

2005-06-17 Thread Ed Reed
Thanks for the reply. What do you mean by 'self join'? >>> Eric Bergen <[EMAIL PROTECTED]> 6/17/05 4:39:28 PM >>> Could you accomplish this with an update and self join? Ed Reed wrote: >Sorry, I thought it was easy to understand. > >I wanna update a field in a table with a value from the s

Re: Subselect in an Update query

2005-06-17 Thread Ed Reed
Thanks >>> <[EMAIL PROTECTED]> 6/17/05 2:03:02 PM >>> Hi, There is one caveat: It is not currently possible to modify a table and select from the same table in a subquery. this phrase is from http://dev.mysql.com/tech-resources/articles/4.1/subqueries.html solution * create table t as S

Re: Subselect in an Update query

2005-06-17 Thread Eric Bergen
Could you accomplish this with an update and self join? Ed Reed wrote: Sorry, I thought it was easy to understand. I wanna update a field in a table with a value from the same field but from a different record of the same table. For example, using the query in my original message, +

Re: Subselect in an Update query

2005-06-17 Thread Ed Reed
Sorry, I thought it was easy to understand. I wanna update a field in a table with a value from the same field but from a different record of the same table. For example, using the query in my original message, +--+ |RecID |FIELD1 |FIELD2 | +---

Re: Subselect in an Update query

2005-06-17 Thread mfatene
Hi, There is one caveat: It is not currently possible to modify a table and select from the same table in a subquery. this phrase is from http://dev.mysql.com/tech-resources/articles/4.1/subqueries.html solution * create table t as Select field1 From table1 Where field2="Some Value" Upda

Re: Subselect in an Update query

2005-06-17 Thread SGreen
"Ed Reed" <[EMAIL PROTECTED]> wrote on 06/17/2005 01:35:40 PM: > Can anyone tell me how I can make this work or suggest a work around? > Update table1 Set field1=(Select field1 From table1 Where field2="Some Value") > Where field2 ="Another Value"; > Thanks OK, your example must be broken (or

Subselect in an Update query

2005-06-17 Thread Ed Reed
Can anyone tell me how I can make this work or suggest a work around? Update table1 Set field1=(Select field1 From table1 Where field2="Some Value") Where field2 ="Another Value"; Thanks

RE: UPDATE Query

2005-05-12 Thread Partha Dutta
, 22)) WHERE Insertion_ID = 190716; -- Partha Dutta, Senior Consultant MySQL Inc, NY, USA, www.mysql.com Are you MySQL certified? www.mysql.com/certification > -Original Message- > From: shaun thornburgh [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 12, 2005 9:47 AM > To: my

UPDATE Query

2005-05-12 Thread shaun thornburgh
Hi, I am getting an error on the following query and but can't understand why, the syntax looks fine to me! mysql> UPDATE CSV_Upload_Data SET SUBSTRING(PRACT_ASCII, 16, 6) = '11' WHERE Insertion_ID = 190716; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that cor

General substring update query required

2005-03-27 Thread zzapper
Hi, I want to replace every occurence of a string with another. The following query works fine (appears to anyway) update tbl_websitepages set page_content=replace (page_content,'develop','bucket'); But is there any way to get any Regexp into the substitution? -- MySQL General Mailing List F

RE: Help with an UPDATE query please

2004-12-29 Thread Jay Blanchard
[snip] I am using version 3.23.54, unfortunately I am unable to supply test data but basically I need to update the Task_ID column for the Bookings table so that it is the same as the Task_ID for Tasks and the Task_Name is 'Booking' and the Bookings Project_ID is the same as the Tasks Project_ID

RE: Help with an UPDATE query please

2004-12-29 Thread shaun thornburgh
<[EMAIL PROTECTED]> To: "shaun thornburgh" <[EMAIL PROTECTED]>, Subject: RE: Help with an UPDATE query please Date: Wed, 29 Dec 2004 13:53:07 -0600 [snip] I am having trouble with an UPDATE query. I have three tables as defined below. My database holds data for bookings. Each booki

RE: Help with an UPDATE query please

2004-12-29 Thread Jay Blanchard
[snip] I am having trouble with an UPDATE query. I have three tables as defined below. My database holds data for bookings. Each booking relates to a project. Each project has many tasks, one of which is a booking. I have now added the column Task_ID to the bookings table. How can I update all

Help with an UPDATE query please

2004-12-29 Thread shaun thornburgh
Hi, I am having trouble with an UPDATE query. I have three tables as defined below. My database holds data for bookings. Each booking relates to a project. Each project has many tasks, one of which is a booking. I have now added the column Task_ID to the bookings table. How can I update all the

Re: Update Query with special conditions.

2004-11-24 Thread GH
I am curious about doing something simular to this... does anyone have an idea On Wed, 24 Nov 2004 00:43:32 -0500, list 123. wrote: > Using mySQL 4.0, I would like to know how I can code a query that will change > the value of Participants.Active from Y to N is for three or more CONSECUTIVE >

Update Query with special conditions.

2004-11-24 Thread list 123.
Using mySQL 4.0, I would like to know how I can code a query that will change the value of Participants.Active from Y to N is for three or more CONSECUTIVE sessions they have Attendance.Present = 'No'? The Attendance Table has Attendance.Session which coresponds to Sessions.SessionID and Attend

Re: long update query does not replicate correctly (cont.)

2004-11-18 Thread Sasha Pachev
Przemyslaw Popielarski wrote: Sasha Pachev <[EMAIL PROTECTED]> wrote: Check if you have any replication restricting rules on the slave. There might be a bug that incorrectly flags a query to be excluded. If that is the case, then try to re-write the rules to see if you can get around the bug. Yes.

Re: long update query does not replicate correctly (cont.)

2004-11-13 Thread Przemyslaw Popielarski
Sasha Pachev <[EMAIL PROTECTED]> wrote: > Check if you have any replication restricting rules on the slave. > There might be a bug that incorrectly flags a query to be excluded. > If that is the case, then try to re-write the rules to see if you can > get around the bug. Yes. I have recently add t

Re: long update query does not replicate correctly (cont.)

2004-11-12 Thread Sasha Pachev
Przemyslaw Popielarski wrote: I'm executing on master a long and complicated query such: UPDATE (lots of tables, lots of LEFT JOIN) SET ... WHERE . Okey, I simplified the query to: - UPDATE tKsidata, tKsiabeksiazki SET tKsidata.STAN_REALNY=tKsiabeksiazki.STAN WHERE tKsidat

Re: long update query does not replicate correctly (cont.)

2004-11-12 Thread Przemyslaw Popielarski
> I'm executing on master a long and complicated query such: > UPDATE (lots of tables, lots of LEFT JOIN) SET ... WHERE . Okey, I simplified the query to: - UPDATE tKsidata, tKsiabeksiazki SET tKsidata.STAN_REALNY=tKsiabeksiazki.STAN WHERE tKsidata.ksi='0815120877' and tKs

long update query does not replicate correctly

2004-11-12 Thread Przemyslaw Popielarski
I'm executing on master a long and complicated query such: UPDATE (lots of tables, lots of LEFT JOIN) SET ... WHERE . The query updates i.e. 3816 rows. The query DOES replicate do master's and slave's binary log. But it DOES NOT execute on slave. 3816 rows are not updated on slave and slave be

RE: Update query help

2004-11-05 Thread Jeff McKeon
Yeah I thought of that but was hoping not to have to use a temp table. Thanks! Jeff -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, November 05, 2004 9:25 AM To: Jeff McKeon Cc: [EMAIL PROTECTED] Subject: Re: Update query help Break it down into two

Re: Update query help

2004-11-05 Thread SGreen
Break it down into two steps. Compute your new values by customerid, then update your customer table with your computed data. CREATE TEMPORARY TABLE tmpFirstTran SELECT CustID, min(Datestamp) as mindate from Transactions group by CustID; update Customer c INNER JOIN tmpFirstTran ft ON ft.CustID

Update query help

2004-11-05 Thread Jeff McKeon
I have two tables. One has a list of customers. The other has a record of customer transactions including unix datestamps of each transaction. I've added a field to the customer table called "First_Transaction" I want to update this field with the datestamp of the first transaction for each cust

Complex update query

2004-10-18 Thread Mauricio Pellegrini
Hi, I don't know if this is possible ( my experience with SQL is very short) but I need to update table A from table B but saving the "Old values" from certain columns into table C. In other words I have 3 tables A,B,C. Table A is going to be updated with values from table B, but I have to kee

Re: How can I turn this into an update query?

2004-10-15 Thread Philippe Poelvoorde
Ed Lazor wrote: Is there a way for me to change this select query into an update query? select t1.ID, t1.Title, t2.Title from products t1, systems t2 where t1.Title like CONCAT(t2.Title, "%") A lot of products have the system title as the first part of the product title. I'm tryin

How can I turn this into an update query?

2004-10-14 Thread Ed Lazor
Is there a way for me to change this select query into an update query? select t1.ID, t1.Title, t2.Title from products t1, systems t2 where t1.Title like CONCAT(t2.Title, "%") A lot of products have the system title as the first part of the product title. I'm trying to upd

Re: update query return value

2004-09-20 Thread Jeff Demel
wrote: No, MySQL will indicate if anything in the row has changed. If you are updating with the same data, than nothing changes and MySQL doesn't waste the time to lock the table, write the data and update the indexes. It's much more efficient this way. On Sep 20, 2004, at 3:22 PM, Jeff

Re: update query return value

2004-09-20 Thread Brent Baisley
e to lock the table, write the data and update the indexes. It's much more efficient this way. On Sep 20, 2004, at 3:22 PM, Jeff Demel wrote: I'm seeing some odd behavior when I run an UPDATE query, and need to know if this is something that MySQL does. It could be something the MySQLDir

Re: update query return value

2004-09-20 Thread Paul DuBois
f you are updating with the same data, than nothing changes and MySQL doesn't waste the time to lock the table, write the data and update the indexes. It's much more efficient this way. On Sep 20, 2004, at 3:22 PM, Jeff Demel wrote: I'm seeing some odd behavior when I run an UPDATE qu

Re: update query return value

2004-09-20 Thread Jeff Demel
QL doesn't waste the time to lock the table, write the data and update the indexes. It's much more efficient this way. On Sep 20, 2004, at 3:22 PM, Jeff Demel wrote: I'm seeing some odd behavior when I run an UPDATE query, and need to know if this is something that MySQL does.

Re: update query return value

2004-09-20 Thread Brent Baisley
emel wrote: I'm seeing some odd behavior when I run an UPDATE query, and need to know if this is something that MySQL does. It could be something the MySQLDirect .NET provider is doing, and to cover that possibility I've sent an email to their support team. So anyway, here's

update query return value

2004-09-20 Thread Jeff Demel
I'm seeing some odd behavior when I run an UPDATE query, and need to know if this is something that MySQL does. It could be something the MySQLDirect .NET provider is doing, and to cover that possibility I've sent an email to their support team. So anyway, here's the scenar

Re: Is this a valid Update Query

2004-09-07 Thread Mark C. Stafford
On Tue, 7 Sep 2004 15:13:25 -0700, Allen Weeks <[EMAIL PROTECTED]> wrote: > Is this a valid query >Update Atable set Afield = concat(Afield, "\n", "Some Text") where KeyField > = 'keydata' Hi Allen, I notice that you're using both single- and double-quotes. I'm in the habit of using on

Is this a valid Update Query

2004-09-07 Thread Allen Weeks
Hi All, Is this a valid query and will it achieve the result of appending a carriage return and some text to the current contents of a "text" type field: Update Atable set Afield = concat(Afield, "\n", "Some Text") where KeyField = 'keydata' Thanks in advance. Allen -- MySQL General

Re: Problem with Slow Update Query

2004-08-10 Thread Michael Stassen
An index on domain cannot be used to satisfy your WHERE clause, because you are comparing the result of a function performed on domain to a value. As soon as you feed your column to a function, you lose the use of an index on that column. So, each and every one of these queries performs a full

Re: Problem with Slow Update Query

2004-08-10 Thread SGreen
First create a table with the "fixed" domain names: CREATE TABLE FixedDomains SELECT DISTINCT domain, left( domain, instr( domain, '.'> ) -1 ) as newdomain FROM url_cat Index your new table (for speed): ALTER FixedDomains ADD INDEX (Domain) *** NOTE: You really want to review (and modify, if n

Problem with Slow Update Query

2004-08-10 Thread Martin Rytz
Hi all I have a problem with slow update queries like these (5 examples): update url_cat set domain = '01net' where left( domain, instr( domain, '.' ) -1 ) = '01net'; update url_cat set domain = '1-meta' where left( domain, instr( domain, '.' ) -1 ) = '1-meta'; update url_cat set domain = '105'

RE: update query question

2004-07-07 Thread Chris W. Parker
[EMAIL PROTECTED] on Wednesday, July 07, 2004 11:08 AM said: > Have you tried this other way of making an inner join? no i did not because i did know you could do a JOIN on an UPDATE. thanks for your suggestions i will try them out. chris. -- MySQL General Mailin

Re: update query question

2004-07-07 Thread SGreen
| | Fax to: | |

update query question

2004-07-06 Thread Chris W. Parker
hello, i've had to change some of the tables in my db to accomodate some greater flexibility in the application that uses it and because of this i need to go through and update all the records. i've done one table by hand and it had about 100 records and took about 20 minutes. but this next table

Re: GRANT update query: Updating host access entry for users but retaining existing passwords

2003-09-30 Thread Shin
Hi, Thanks for the followup/reply. On Tue, Sep 30, 2003 at 01:56:11PM +0100, Andy Eastham wrote: > I've never tried this, so it's pure speculation, but I believe all of the > grant information is contained in a regular table called user. I had a look into this and it seems that some of the info

RE: GRANT update query: Updating host access entry for users but retaining existing passwords

2003-09-30 Thread Andy Eastham
[EMAIL PROTECTED] > Subject: GRANT update query: Updating host access entry for users but > retaining existing passwords > > > Hi, > > I've got a MYSQL 3.23.x setup that has approx 4000 database and 4000 > user accounts. 1 database per user. > > I created each u

GRANT update query: Updating host access entry for users but retaining existing passwords

2003-09-30 Thread Shin
Hi, I've got a MYSQL 3.23.x setup that has approx 4000 database and 4000 user accounts. 1 database per user. I created each userid from a script of the form CREATE DATABASE mdb_userid; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX,RELOAD ON mdb_userid.* TO [EMAIL PROTECTED]

Re: Getting the primary key in an update query

2003-09-10 Thread Daniel Rossi
that works cheers >>> "Roger Baklund" <[EMAIL PROTECTED]> 09/11/03 10:48am >>> * Daniel Rossi > Hi there i was wondering if there was anyway to determine the > primary key field instead of explicitly setting it in an update > sql query ? > > for instance i'd like to go update table *** where prima

Re: Getting the primary key in an update query

2003-09-10 Thread Roger Baklund
* Daniel Rossi > Hi there i was wondering if there was anyway to determine the > primary key field instead of explicitly setting it in an update > sql query ? > > for instance i'd like to go update table *** where primarykey=1 > instead of where id=1 as the primary key is named differentrly > for e

Getting the primary key in an update query

2003-09-10 Thread Daniel Rossi
Hi there i was wondering if there was anyway to determine the primary key field instead of explicitly setting it in an update sql query ? for instance i'd like to go update table *** where primarykey=1 instead of where id=1 as the primary key is named differentrly for each table and i'm trying t

Re: Possible: Update query within another query's loop?

2003-08-28 Thread Fred van Engen
Antony, On Thu, Aug 28, 2003 at 06:45:27PM +0400, Antony Dovgal wrote: > On Thu, 28 Aug 2003 16:37:41 +0200 > Fred van Engen <[EMAIL PROTECTED]> wrote: > > > Please elaborate. > > I've already answered: > On the list I just saw your 'bad advice' message without explanation. > On Thu, 28 Aug

RE: Possible: Update query within another query's loop?

2003-08-28 Thread Mark Richards
n't change data the other is dependent on :) Thanks for the great idea. -m- -Original Message- From: Antony Dovgal [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 10:30 To: [EMAIL PROTECTED] Subject: Re: Possible: Update query within another query's loop? On Thu,

Re: Possible: Update query within another query's loop?

2003-08-28 Thread Antony Dovgal
On Thu, 28 Aug 2003 16:37:41 +0200 Fred van Engen <[EMAIL PROTECTED]> wrote: > Please elaborate. I've already answered: On Thu, 28 Aug 2003 17:07:19 +0400 Antony Dovgal <[EMAIL PROTECTED]> wrote: > You don't need execute UPDATE's in the loop in this case. > Try smthing like that: > . > >

Re: Possible: Update query within another query's loop?

2003-08-28 Thread Fred van Engen
Antony, On Thu, Aug 28, 2003 at 06:29:54PM +0400, Antony Dovgal wrote: > On Thu, 28 Aug 2003 16:23:35 +0200 > Fred van Engen <[EMAIL PROTECTED]> wrote: > > > You need to make a separate connection to MySQL for the outer query to > > prevent the inner query from messing up the outer query's result

Re: Possible: Update query within another query's loop?

2003-08-28 Thread Antony Dovgal
On Thu, 28 Aug 2003 16:23:35 +0200 Fred van Engen <[EMAIL PROTECTED]> wrote: > You need to make a separate connection to MySQL for the outer query to > prevent the inner query from messing up the outer query's result set. > See the PHP manual for obtaining the connection id's from mysql_connect >

Re: Possible: Update query within another query's loop?

2003-08-28 Thread Fred van Engen
er loop, I have Query1, which returns set Result1. Inside this loop, > I run an UPDATE query which returns Result2. > > // executed first query. > while ($row = mysql_fetch_assoc($result1)) > { > // get the record ID for the row we are on. > $recid = $row

Possible: Update query within another query's loop?

2003-08-28 Thread Mark Richards
I am still quite new to MySQL and have a basic question. I am using PHP, so forgive me if this is more a PHP issue. I want to perform an update to a specific record based on a condition. In the outer loop, I have Query1, which returns set Result1. Inside this loop, I run an UPDATE query

Re: Possible: Update query within another query's loop?

2003-08-28 Thread Antony Dovgal
dition. In > the outer loop, I have Query1, which returns set Result1. Inside this loop, > I run an UPDATE query which returns Result2. > > // executed first query... > while ($row = mysql_fetch_assoc($result1)) > { > // get the record ID f

Possible: Update query within another query's loop?

2003-08-28 Thread Mark Richards
I am still quite new to MySQL and have a basic question. I am using PHP, so forgive me if this is more a PHP issue. I want to perform an update to a specific record based on a condition. In the outer loop, I have Query1, which returns set Result1. Inside this loop, I run an UPDATE query which

Possible: Update query within another query's loop?

2003-08-27 Thread Mark Richards
I am still quite new to MySQL and have a basic question. I am using PHP, so forgive me if this is more a PHP issue. I want to perform an update to a specific record based on a condition. In the outer loop, I have Query1, which returns set Result1. Inside this loop, I run an UPDATE query which

Re: update query using inner join on same table

2003-07-23 Thread Victoria Reznichenko
"Jonathan Patton" <[EMAIL PROTECTED]> wrote: > I have a query that runs in Microsoft Access against my mysql database just fine. It > is: > > > UPDATE discussion_categories AS discussion_categories_1 > INNER JOIN discussion_categories ON > discussion_categories_1.parent_1_text = discussion_ca

RE: update query using inner join on same table

2003-07-23 Thread Jonathan Patton
I answered my own question, this works for joining a table on itself and doing an update query: update discussion_categories discussion_categories1, discussion_categories set discussion_categories1.parent_1 = discussion_categories.category_id where

  1   2   >