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
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
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 = ',
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
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
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,
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
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
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
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
;
++---+
| 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
| 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
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
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)
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.
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
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
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
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
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
* 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
21 matches
Mail list logo