Perfect. Thank you.
Victor
On Sun, Jul 26, 2009 at 2:18 PM, Darryle Steplight wrote:
> 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 Subervi
> wrote:
> > Hi;
> > I
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 Subervi wrote:
> Hi;
> I would like to test the following:
>
> update maps set map where site=mysite;
>
> to see if there is s
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 you
Hi;
I would like to test the following:
update maps set map where site=mysite;
to see if there is such an entry in maps. If there is, then update. If there
is not, then I would like to execute an insert statement. How do I do that?
TIA,
Victor
Hello.
Please, could you provide the CREATE statement for you tables
and describe the relationships between their fields (it will
be good if you include sample data as well).
Matthew Batt wrote:
> Hi
>
> I need to update the 'products_id' field (shown below) by copying data
> from
Hi
I need to update the 'products_id' field (shown below) by copying data from
a separate table but I can't use the 'UPDATE' query as each 'product_id'
entry relates to a specific 'products_model' row.
id / assembly_no / products_id / products_model
1 / 2313 / *** / CASEACERENTRY2
2 / 2313 /
This statement works if I enter it directly into mysql:
UPDATE BEX_USER_REG_INFO SET STATUS_ID=5 WHERE
BEX_USER_REG_INFO.BEX_USER_REG_INFO_ID=2
Utilizing the openquery command I'm trying to do the same thing from a
MS SQL Server
SELECT * FROM OPENQUERY(MYSQLTEST, 'UPDATE BEX_USER_REG_INFO SET
From: Keith C. Ivey [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 8:55 AM
To: [EMAIL PROTECTED]
Subject: Re: unixtime update syntax
On 2 Dec 2003 at 7:57, Ron McKeever wrote:
I have a db that gets data dumped into it. One of the columns gets
unix timestamp data "utime". I what t
On 2 Dec 2003 at 9:12, Ron McKeever wrote:
> Thats seems like a bug to me.
>
> I would think FROM_UNIXTIME would take a unixtime stamp
> and covert it to what it is. We know its from GMT
A Unix timestamp represents a particular second in time. It doesn't
have a time zone associated with it. Y
Message-
From: Keith C. Ivey [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 8:55 AM
To: [EMAIL PROTECTED]
Subject: Re: unixtime update syntax
On 2 Dec 2003 at 7:57, Ron McKeever wrote:
> I have a db that gets data dumped into it. One of the columns gets
> unix timestamp data
On 2 Dec 2003 at 7:57, Ron McKeever wrote:
> I have a db that gets data dumped into it. One of the columns gets
> unix timestamp data "utime". I what to covert that into a datetime
> column so I can utlize indexes and such. But I still what the unixtime
> to remain.
You can use indexes with a Uni
(0.00 sec)
Any ideas?
Ron
-Original Message-
From: Dan Greene [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 8:30 AM
To: Ron McKeever; [EMAIL PROTECTED]
Subject: RE: unixtime update syntax
The time zone matters... your results are exactly 8 hours off... PST is
gmt -8.
) from t_test;
> -Original Message-
> From: Ron McKeever [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 02, 2003 10:58 AM
> To: [EMAIL PROTECTED]
> Subject: unixtime update syntax
>
>
> Anyone have a response to the following:
>
> Hi
>
> I hav
Anyone have a response to the following:
Hi
I have a db that gets data dumped into it. One of the columns gets unix
timestamp data "utime".
I what to covert that into a datetime column so I can utlize indexes and
such.
But I still what the unixtime to remain.
I know I can get the data I want wit
Hi
I have a db that gets data dumped into it. One of the columns gets unix
timestamp data "utime".
I what to covert that into a datetime column so I can utlize indexes and
such.
But I still what the unixtime to remain.
I know I can get the data I want with php or mysql to convert it, but I need
b
;
To: "Randy Chrismon" <[EMAIL 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...
> >
&
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
> upd
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. Because this app may be ported over to a DB2 server, I am
av
table.
>
>Regards,
>
>Sal
>
>
>> -Original Message-
>> From: MySQL [mailto:[EMAIL PROTECTED]
>> Sent: 12 March 2003 22:33
>> To: MySQL
>> Subject: UPDATE syntax help
>>
>>
>> Hi all, I am having a little UPDATE synt
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
> Su
"Andy 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.
cript file 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: UPD
s" <[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 all, I am having a little UPDATE syntax issue. According to th
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
Subj
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_LOCATI
Hi all, I am having a little UPDATE syntax issue. According to the manual
UPDATE EBA_USERS, IMPORT_USERS
SET EBA_USERS.HUB_ID = IMPORT_USERS.HUB_ID,
EBA_USERS.REP_LOCATION_ID = IMPORT_USERS.REP_LOCATION_ID,
EBA_USERS.REP_FIRST_NAME = IMPORT_USERS.REP_FIRST_NAME,
EBA_USERS.REP_LAST_NAME
At 21:41 -0600 3/9/03, Charles Lewis wrote:
I was reading somewhere that MySQL 4.1 UPDATE syntax will allow
update to table with values from another table in the following
manner:
update client, zip
set client.st = zip.st, client.city = zip.city
where client.zip = zip.zip;
Is there a creative
I was reading somewhere that MySQL 4.1 UPDATE syntax will allow update to
table with values from another table in the following manner:
update client, zip
set client.st = zip.st, client.city = zip.city
where client.zip = zip.zip;
Is there a creative way to do this in 4.0.11?
chas
EMAIL PROTECTED]'
Subject: Update syntax
Hi All,
With a database that contains tables PetInv and Purchases:
mysql> update PetInv
-> set PetInv.Qty = PetInv.Qty + Purchases.Qty
-> where PetInv.ItemNo = Purchases.ItemNo;
ERROR 1109: Unknown table 'Purchases' in whe
Hi All,
With a database that contains tables PetInv and Purchases:
mysql> update PetInv
-> set PetInv.Qty = PetInv.Qty + Purchases.Qty
-> where PetInv.ItemNo = Purchases.ItemNo;
ERROR 1109: Unknown table 'Purchases' in where clause
As you can see I'm trying to add purchase quantitie
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 y
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.
>
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 t
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 C-styl
AND voteID='3');
HTH,
Bryant Hester
Juxtapose, inc.
-Original Message-
From: Matthias Trevarthan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 9:31 AM
To: [EMAIL PROTECTED]
Subject: UPDATE syntax dummy question...
Howdy,
I'm
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
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 | Key | Default | Extra |
+-+--+--+-+-+---+
|
jk bericht-
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> synta
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> RSV
Vadim,
Friday, February 01, 2002, 5:00:33 AM, you wrote:
VK> Greetings:
VK> I'm trying to update a table T1 based on the condition which is a result
VK> of the key join table A and table B
VK> the following command works with SYBASE but doesn't with MySQL:
VK> update A,B set A.field2='test'
>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 31, 2002 10:00 PM
Subject: Update syntax
> Greetings:
>
> I'm trying to update a table T1 based on the condition which is a result
> of the key join table A and table B
> the following command works with SYBASE but doe
Greetings:
I'm trying to update a table T1 based on the condition which is a result
of the key join table A and table B
the following command works with SYBASE but doesn't with MySQL:
update A,B set A.field2='test' where A.field1=B.field1 and
B.field5='test2'
What's the correct syntax for
On Mon, 22 Jan 2001, Don wrote:
> Hi,
>
> I'm looking at the docs for the UPDATE syntax right now!
>
> Here is my code (in Perl):
>
> $sqlCmd = $dbh->prepare("UPDATE Ports SET Country = $country,
>
Don wrote:
>
> Hi,
>
> I'm looking at the docs for the UPDATE syntax right now!
>
> Here is my code (in Perl):
>
> $sqlCmd = $dbh->prepare("UPDATE Ports SET Country = $country,
>
Hi,
I'm looking at the docs for the UPDATE syntax right now!
Here is my code (in Perl):
$sqlCmd = $dbh->prepare("UPDATE Ports SET Country = $country,
TransPort = $transPort,
Suspended
45 matches
Mail list logo