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
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
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
PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, October 22, 2003 04:55
Subject: Re: Update Syntax
Can you use REPLACE?
Kelley
Randy Chrismon wrote:
Please tell me it ain't so...
I am writing a Lotus Nots agent to feed data directly into a MySQL
table. The agent needs to either insert
Can you use REPLACE?
Kelley
Randy Chrismon wrote:
Please tell me it ain't so...
I am writing a Lotus Nots agent to feed data directly into a MySQL
table. The agent needs to either insert a new record or update an
existing record depending on whether a document in Nots is new or
updated.
Very close.
Only one table may be updated per UPDATE statement.
Doug
On Sun, 23 Mar 2003 00:52:59 -, [EMAIL PROTECTED] wrote:
Hi
I may be way off base here but - why do you reference IMPORT_USERS in your
UPDATE statement? You aren't updating any columns in that table.
Regards,
Sal
Hi
I may be way off base here but - why do you reference IMPORT_USERS in your
UPDATE statement? You aren't updating any columns in that table.
Regards,
Sal
-Original Message-
From: MySQL [mailto:[EMAIL PROTECTED]
Sent: 12 March 2003 22:33
To: MySQL
Subject: UPDATE syntax help
At 8:33 +1000 3/13/03, MySQL wrote:
Hi all, I am having a little UPDATE syntax issue. According to the manual
According to the manual, this won't work until MySQL 4.x
UPDATE EBA_USERS, IMPORT_USERS
SET EBA_USERS.HUB_ID = IMPORT_USERS.HUB_ID,
EBA_USERS.REP_LOCATION_ID =
That explains it then D'OH
Is there a workaround?
Thanks :-)
- Original Message -
From: Paul DuBois [EMAIL PROTECTED]
To: MySQL [EMAIL PROTECTED]; MySQL [EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 9:02 AM
Subject: Re: UPDATE syntax help
At 8:33 +1000 3/13/03, MySQL wrote:
Hi
]
To: MySQL [EMAIL PROTECTED]; MySQL [EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 9:02 AM
Subject: Re: UPDATE syntax help
At 8:33 +1000 3/13/03, MySQL wrote:
Hi all, I am having a little UPDATE syntax issue. According to the
manual
According to the manual, this won't work until MySQL 4.x
with your code (or
directly from SQL if you're a martyr) and then run it.
I've used both methods successfully,
Andy
-Original Message-
From: JJ [mailto:[EMAIL PROTECTED]
Sent: 12 March 2003 23:45
To: MySQL
Cc: Paul DuBois
Subject: Re: UPDATE syntax help
That explains
Eastham [EMAIL PROTECTED]
To: [EMAIL PROTECTED] Mysql. Com [EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 10:14 AM
Subject: RE: UPDATE syntax help
Paul,
You have to use the results of one select to generate lots of update
statements. If you execute all these from your program, make sure you
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#UPD
ATE
Last line in 6.4.5
=C=
*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*
-Original Message-
From: Jim Racster [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 30, 2002 10:06 AM
To: '[EMAIL
Hi,
You should escape quotes within strings:
Matthias Trevarthan wrote:
Howdy,
I'm trying to perform an update on a php poll table.
Here is the table description:
mysql describe vbooth_data;
+-+--+--+-+-+---+
| Field | Type | Null |
Matthias,
MySQL is letting you know that you have an unterminated string with the
apostrophe. You'll have to either use double quotes to contain the
string Not at all, I'm waiting for the other shoe to drop, or escape
the apostrophe in the word I'm.
i.e.
UPDATE vbooth_data SET optionText=Not at
You need to escape the ' mark in your string. The query should be:
update vbooth_data set optionText='Not at all, I''m waiting for the
other shoe to drop' where (pollID=34 AND voteID=3);
Note the '' within the string: the first tick escapes the second one.
If you're more comfortable with
Howdy Matthias,
update vbooth_data set optionText='Not at all, I'm waiting for the other
shoe
to drop' where (pollID='34' AND voteID='3');
When I hit Enter, it gives me this prompt:
'
Two things:
1 (the ) is because it is waiting for the end of the string - you have an
apostrophe opening
Thanks everyone!
I see that I need double quotes now.
I received about 12 different personal emails from various people with exactly
the same answer. Thanks again!
On Tuesday 03 September 2002 10:31, Matthias Trevarthan wrote:
Howdy,
I'm trying to perform an update on a php poll table.
On Tue, 2002-09-03 at 16:31, Matthias Trevarthan wrote:
And here is my update query:
update vbooth_data set optionText='Not at all, I'm waiting for the other shoe
to drop' where (pollID='34' AND voteID='3');
When I hit Enter, it gives me this prompt:
'
This prompt indicates you did
-
Van: Egor Egorov [mailto:[EMAIL PROTECTED]]
Verzonden: donderdag 20 juni 2002 15:53
Aan: [EMAIL PROTECTED]
Onderwerp: Re: update syntax
RBRoa,
Thursday, June 20, 2002, 8:07:54 AM, you wrote:
R Is it possible to include another table in [where clause] using the
update
R syntax in MySQL?..
R e.g
Hello Terry,
Thursday, June 20, 2002, 5:14:40 PM, you wrote:
DT Egor,
DT I hope I understand you work for MySQL in some fashion, is there any plan to
DT allow sub-selects in future releases ?
Yes, multi-table updates and sub-selects is on development and they
will come in version 4.1
DT RSVP,
You can't in a single SQL statement in MySQL: MySQL does not allow updates
based upon joins.
Program around it using whatever language (perl, php, etc.) that you're
running the SQL statements from.
- Original Message -
From: Vadim Kulikov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
22 matches
Mail list logo