Re: Update question

2007-04-26 Thread Jørn Dahl-Stamnes
On Wednesday 25 April 2007 23:14, you wrote: > try this: > > > update table1, table2 > set table1.value = table2.value > where table1.id = table2.id Thanks for the replies... It was late evening when I tried to figure out how to do this. Today I found the answer myself, which is exactly as descr

Re: Update question

2007-04-25 Thread Mogens Melander
On Wed, April 25, 2007 23:10, Jørn Dahl-Stamnes wrote: > Please, I nedd help!! > > I have two tabels: > > table1: > id > value > > table2: > id > value > > Both tables has a lot of records with identical IDs. I need to update the > table1.value with the table2.value where t

Re: UPDATE question

2006-05-03 Thread Mark Leith
Cummings, Shawn (GNAPs) wrote: If I have 4 Fields (FIELD1, FIELD2, FIELD3 & FIELD4) I can do this easily; UPDATE TABLE_NAME SET FIELD4 = FIELD1; But -- how do I do it so that FIELD4 = FIELD1 & FIELD2 ??? I can't seem to find any examples online. Maybe it's just too early in the mornin

Re: UPDATE question

2006-05-03 Thread Terry Burton
On 5/3/06, Barry <[EMAIL PROTECTED]> wrote: Cummings, Shawn (GNAPs) schrieb: > > If I have 4 Fields (FIELD1, FIELD2, FIELD3 & FIELD4) > > I can do this easily; > > UPDATE TABLE_NAME SET FIELD4 = FIELD1; > > But -- how do I do it so that FIELD4 = FIELD1 & FIELD2 ??? I can't seem > to find any

Re: UPDATE question

2006-05-03 Thread Barry
Cummings, Shawn (GNAPs) schrieb: If I have 4 Fields (FIELD1, FIELD2, FIELD3 & FIELD4) I can do this easily; UPDATE TABLE_NAME SET FIELD4 = FIELD1; But -- how do I do it so that FIELD4 = FIELD1 & FIELD2 ??? I can't seem to find any examples online. Maybe it's just too early in the morni

RE: UPDATE question

2006-05-03 Thread George Law
Shawn, Perhaps : UPDATE TABLE_NAME SET FIELD4 = concat(FIELD1,FIELD2); -Original Message- From: Cummings, Shawn (GNAPs) [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 03, 2006 9:33 AM To: Mysql General (E-mail) Subject: UPDATE question If I have 4 Fields (FIELD1, FIELD2, FIELD3 &

Re: Update question

2004-02-28 Thread Paul DuBois
At 18:41 -0400 2/28/04, Juan E Suris wrote: Here's my table definition: CREATE TABLE `files` ( `id` int(11) NOT NULL auto_increment, `checksum` char(32) NOT NULL default '', `size` bigint(20) NOT NULL default '0', PRIMARY KEY (`id`), KEY `checksum` (`checksum`(8)) This table is used to store info

Re: Update question

2003-09-18 Thread Paul DuBois
At 5:14 PM -0500 9/18/03, <[EMAIL PROTECTED]> wrote: I'm not quite sure why I haven't run across this in the past, but now that I have I am stumped. I am needing to update a table based on criteria found in it and one other table, but I am uncertain how to proceed. If I had subselects I would run t

Re: update question

2003-03-02 Thread chip wiegand
or two on MySQL. So, I'll have to buy a SQL book specifically. Regards, Chip > - Original Message - > From: "chip wiegand" <[EMAIL PROTECTED]> > To: "Tore Bostrup" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Sunday, March 02,

Re: update question

2003-03-02 Thread Tore Bostrup
iginal Message - From: "chip wiegand" <[EMAIL PROTECTED]> To: "Tore Bostrup" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, March 02, 2003 4:25 PM Subject: Re: update question > On Sun, 2 Mar 2003 02:06:40 -0500 > "Tore Bostrup"

Re: update question

2003-03-02 Thread chip wiegand
On Sun, 2 Mar 2003 02:06:40 -0500 "Tore Bostrup" <[EMAIL PROTECTED]> wrote: > I assume you are storing your dates in a char/varchar column - not a > good choice to start with... :-< yes, varchar. I'm still learning this stuff, and experimenting with it. > Assuming all the values are supposed to

Re: update question

2003-03-01 Thread Tore Bostrup
I assume you are storing your dates in a char/varchar column - not a good choice to start with... :-< Assuming all the values are supposed to be stored as MM-DD-YY (anothoer marginal choice, but the problem may not rear its head again for another 96+ years), you can do the following: UPDATE mytab

RE: update question

2002-11-01 Thread Anderson, Alan R
> -Original Message- > From: Jörgen Winqvist [mailto:jorgen@;winqvist.net] > > I need to let the values in two columns change place with each other. > I've tried to "update xxx set a=b, b=a" but that doesn't work > (b=a uses > the "new" a). Here's a cute trick for swapping two numbers w

re: update question

2002-11-01 Thread Egor Egorov
Jörgen, Friday, November 01, 2002, 11:06:38 AM, you wrote: JW> I need to let the values in two columns change place with each other. JW> I've tried to "update xxx set a=b, b=a" but that doesn't work (b=a uses JW> the "new" a). If you want to change place for all values, you can just rename colu

Re: UPDATE question, SQL syntax, etc.

2002-05-20 Thread Victoria Reznichenko
.ben, Monday, May 20, 2002, 3:15:11 PM, you wrote: b> hi. i'm new to the list and have only been playing with mySQL for a few b> weeks now, i have a question regrading the syntax of an UPDATE statement - i b> hope nobody minds me asking. b> i want to uopdate a table with the data from another,

RE: UPDATE question, SQL syntax, etc.

2002-05-20 Thread .ben
cheers for the responses. i'll have to find another way, but thanks. .b > -Original Message- > From: Nick Stuart [mailto:[EMAIL PROTECTED]] > Sent: 20 May 2002 13:46 > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: UPDATE question, SQL syntax, etc. >

Re: UPDATE question, SQL syntax, etc.

2002-05-20 Thread Nick Stuart
There is no from clause in the update syntax. However, I'm not sure how you would update a tablethe way you are trying to. I'm sure it can be done, and your SQL looks correct besides the fromclause. Just take that out and see if what it says. -Nick > hi. i'm new to the list and have only been

RE: UPDATE question, SQL syntax, etc.

2002-05-20 Thread Jay Blanchard
[snip] update trackinfo SET trackinfo.postcode = newtrackinfo.postcode FROM trackinfo, newtrackinfo WHERE trackinfo.telephone = newtrackinfo.telephone; [/snip] http://www.mysql.com/doc/U/P/UPDATE.html MySQL does not support sub-queries, such as the one you are attempting here. (the "FROM" on..) Y

Re: update question number in mysql

2002-04-15 Thread bin cai
Hi, Steven and christopher, Thanks a lot for your help. I think i have to store the question number in table. my talbe questionbank store the questions related more than one course. every course has six question sets. so i use question set id and question number as primary key. There is one probl

Re: update question number in mysql

2002-04-12 Thread Steven Hajducko
On Fri, 2002-04-12 at 13:52, Christopher Thompson wrote: > You shouldn't be storing the questio number at all. You have denormalised > your database and this is why you are experiencing this problem. Maybe I don't understand bin's problem, but storing the question # wouldn't seem to be de-norma

Re: update question number in mysql

2002-04-12 Thread Christopher Thompson
You shouldn't be storing the questio number at all. You have denormalised your database and this is why you are experiencing this problem. Instead, store a unique identifier with each one (an 'id' field, autonumbering) and then, when you pull back all the questions, order it by this ID field.

Re: Update Question

2001-01-19 Thread Bob Hall
>Hi. > >On Thu, Jan 18, 2001 at 05:39:25PM -0500, [EMAIL PROTECTED] wrote: > > > > How can I do the following: > > > > update location set location.city_id = location_city.city_id where > > location.city = location_city.name; > > > > I want to update one field in a table with values from an

Re: Update Question

2001-01-18 Thread Benjamin Pflugmann
Hi. On Thu, Jan 18, 2001 at 05:39:25PM -0500, [EMAIL PROTECTED] wrote: > > How can I do the following: > > update location set location.city_id = location_city.city_id where > location.city = location_city.name; > > I want to update one field in a table with values from another table. Is > thi