Re: Update Syntax

2009-07-26 Thread Victor Subervi
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

Re: Update Syntax

2009-07-26 Thread Darryle Steplight
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

Re: Update Syntax

2009-07-26 Thread Michael Dykman
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

Update Syntax

2009-07-26 Thread Victor Subervi
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

Re: Problem with UPDATE syntax when updating multiple tables

2005-12-15 Thread Gleb Paharenko
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

Problem with UPDATE syntax when updating multiple tables

2005-12-15 Thread Matthew Batt
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 /

update syntax

2004-01-26 Thread Gronquist, James M
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

Re: unixtime update syntax

2003-12-02 Thread Michael Stassen
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

RE: unixtime update syntax

2003-12-02 Thread Keith C. Ivey
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

RE: unixtime update syntax

2003-12-02 Thread Ron McKeever
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

Re: unixtime update syntax

2003-12-02 Thread Keith C. Ivey
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

RE: unixtime update syntax

2003-12-02 Thread Ron McKeever
(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.

RE: unixtime update syntax

2003-12-02 Thread Dan Greene
) 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

unixtime update syntax

2003-12-02 Thread Ron McKeever
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

unixtime update syntax

2003-12-01 Thread Ron McKeever
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

Re: Update Syntax

2003-10-23 Thread Director General: NEFACOMP
; 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... > > &

Re: Update Syntax

2003-10-21 Thread Kelley Lingerfelt
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

Update Syntax

2003-10-21 Thread Randy Chrismon
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

RE: UPDATE syntax help

2003-03-23 Thread Doug Thompson
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

RE: UPDATE syntax help

2003-03-22 Thread [EMAIL PROTECTED]
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

Re: UPDATE syntax help

2003-03-12 Thread JJ
"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.

RE: UPDATE syntax help

2003-03-12 Thread Andy Eastham
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

Re: UPDATE syntax help

2003-03-12 Thread Paul DuBois
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

Re: UPDATE syntax help

2003-03-12 Thread JJ
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

Re: UPDATE syntax help

2003-03-12 Thread Paul DuBois
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

UPDATE syntax help

2003-03-12 Thread MySQL
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

Re: MySQL 4.0.11 update syntax

2003-03-09 Thread Paul DuBois
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

MySQL 4.0.11 update syntax

2003-03-09 Thread Charles Lewis
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

RE: Update syntax

2002-12-30 Thread Cal Evans
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

Update syntax

2002-12-30 Thread Jim Racster
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

Re: UPDATE syntax dummy question...

2002-09-03 Thread Mertens Bram
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

Re: UPDATE syntax dummy question...

2002-09-03 Thread Matthias Trevarthan
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. >

Re: UPDATE syntax dummy question...

2002-09-03 Thread DL Neil
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

Re: UPDATE syntax dummy question...

2002-09-03 Thread Chris Tucker
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

RE: UPDATE syntax dummy question...

2002-09-03 Thread Bryant Hester
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

Re: UPDATE syntax dummy question...

2002-09-03 Thread Joseph Bueno
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

UPDATE syntax dummy question...

2002-09-03 Thread Matthias Trevarthan
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 | +-+--+--+-+-+---+ |

RE: update syntax

2002-06-23 Thread Wouter van Vliet
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

Re: Re: RE: update syntax

2002-06-21 Thread Egor Egorov
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

Update syntax

2002-02-01 Thread Egor Egorov
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'

Re: Update syntax

2002-01-31 Thread Douglas Forrest
> 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

Update syntax

2002-01-31 Thread Vadim Kulikov
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

Re: Error in UPDATE syntax?

2001-01-22 Thread Atle Veka
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, >

Re: Error in UPDATE syntax?

2001-01-22 Thread Stuart Fox
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, >

Error in UPDATE syntax?

2001-01-22 Thread Don
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