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: 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 name

Re: Help with update

2004-05-21 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 ita_f

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

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 statement

2003-12-29 Thread Abs
--- rmck <[EMAIL PROTECTED]> wrote: > mysql> SELECT start,ID FROM table ORDER BY id DESC > LIMIT 1; > > ++---+ > | start | ID| > ++---+ > | 10726035

Help with Update statement

2003-12-29 Thread rmck
Hello, I have a db that a script failed to run against, and becasue of that a column did not get updated. I have a varchar col that has unixtime timstamp in it. That column gets converted to be readable. My problem is I have many rows that need to be updated, but I dont want to re-convert t

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

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 rep

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

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 i