RE: help with update query

2006-10-16 Thread Jerry Schwartz
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: mysql Subject: Re: help with update query Thanks Dan

Re: help with update query

2006-10-16 Thread Ferindo Middleton
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: mysql Subject: Re: help with update query Thanks Dan. This does

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 = ',

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

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

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,

Re: Help with update

2004-05-22 Thread Michael Stassen
Laercio Xisto Braga Cavalcanti wrote: Hi all, I'm using mysql 3.23.54 under RedHat9 trying to update a field named pac_fone in a table named paciente with the value of a field named ita_fone from a table named italica as follows: update paciente SET pac_fone= (select

Re: Help with update

2004-05-22 Thread Laercio Xisto Braga Cavalcanti
Hi Michael, Thank you very much. It works good. Regards, Laercio. Laercio Xisto Braga Cavalcanti wrote: Hi all, I'm using mysql 3.23.54 under RedHat9 trying to update a field named pac_fone in a table named paciente with the value of a field named ita_fone from a table named italica as

Help with update

2004-05-21 Thread Laercio Xisto Braga Cavalcanti
Hi all, I'm using mysql 3.23.54 under RedHat9 trying to update a field named pac_fone in a table named paciente with the value of a field named ita_fone from a table named italica as follows: update paciente SET pac_fone= (select ita_fone fromitalica

Re: Help with update

2004-05-21 Thread Bob Lockie
On 05/21/04 20:40 Laercio Xisto Braga Cavalcanti spoke: Hi all, I'm using mysql 3.23.54 under RedHat9 trying to update a field named pac_fone in a table named paciente with the value of a field named ita_fone from a table named italica as follows: Try more quotes and get the select to work: select

Help with Update statement

2003-12-29 Thread rmck
; ++---+ | start | ID| ++---+ | 1072603517 | 617168732 | ++---+ 1 row in set (0.01 sec) mysql So now I want to run my update statment, how do I not update the times that have been converted??? Help my current update statement

Re: Help with Update statement

2003-12-29 Thread Abs
| 617168732 | ++---+ 1 row in set (0.01 sec) mysql So now I want to run my update statment, how do I not update the times that have been converted??? Help my current update statement: from script: OID=`echo select ID from $TBLE order by ID desc limit 1; | $MSQL

help on update

2002-07-02 Thread Matthew Hajda
Hello, I am having some issues inserting and updating with mySQL. Database: asdf Table: test field: idfield (int, autoincrement) field: test (char) the query: insert into test set test = 'test' ; used in mascon or DBvisualizer correctly inserts the record. however, when

Re: help on update

2002-07-02 Thread Jed Verity
Hi, Matthew, Have you tried: insert into test (test) values ('work') Or update test set test='test' I liked it when Matthew Hajda wrote this to me: Hello, I am having some issues inserting and updating with mySQL. Database: asdf Table: test field: idfield (int, autoincrement)

Re: help on update

2002-07-02 Thread Paul DuBois
At 18:54 + 7/2/02, Matthew Hajda wrote: Hello, I am having some issues inserting and updating with mySQL. You're not testing the result from mysql_query() to see whether not it succeeds. Do so, and they print the result from mysql_error() in the event of failure to see what it says.

Re: Re: Help with UPDATE and SET with two tables

2002-05-15 Thread Egor Egorov
Andrew, Tuesday, May 14, 2002, 10:56:43 PM, you wrote: AL On Tuesday 14 May 2002 06:10 am, Egor Egorov wrote: If not, can I write the Query results of the SELECT statement out to a new table and delete the original table?       Yes, you can use CREATE ... SELECT statement. AL Thank you for

Re: Help with UPDATE and SET with two tables

2002-05-14 Thread Egor Egorov
Andrew, Tuesday, May 14, 2002, 12:43:31 AM, you wrote: AL I have a database with several tables. I want to update a field in that AL table with a field contained in another table. I have a unique key to use AL for a WHERE clause. AL This is easy to do with various procedural languages

Re: Help with UPDATE and SET with two tables

2002-05-14 Thread Andrew Lietzow
On Tuesday 14 May 2002 06:10 am, Egor Egorov wrote: If not, can I write the Query results of the SELECT statement out to a new table and delete the original table?       Yes, you can use CREATE ... SELECT statement. Thank you for the reply, Egor. Here is what I have tried since your reply

Help with UPDATE and SET with two tables

2002-05-13 Thread Andrew Lietzow
Dear MySQL Wizards, I have a database with several tables. I want to update a field in that table with a field contained in another table. I have a unique key to use for a WHERE clause. This is easy to do with various procedural languages (Business Basic, for one) but I don't find much

help: table update program?

2002-04-01 Thread James Gosnell
Does anyone know of a program or algorithm that will take a table structure and update another table to the new one? Like, to just change or add a column? What I'm trying to do is continually update the table with different fields, or change the field types whenever I feel the need to add a new

RE: help: table update program?

2002-04-01 Thread Roger Baklund
* James Gosnell Does anyone know of a program or algorithm that will take a table structure and update another table to the new one? Like, to just change or add a column? What I'm trying to do is continually update the table with different fields, or change the field types whenever I feel the