Re: update select question

2008-04-15 Thread Ananda Kumar
update newslettercontent c set c.timestamp= (select n.publishdate from newsletter n where n.NLCID= c.NLCID); This should work. On 4/16/08, Chris W <[EMAIL PROTECTED]> wrote: > > I have the following query... > > SELECT c.NLCID, n.publishdate > FROM newsletter n > JOIN newslettersection s using

Re: update select question

2008-04-15 Thread Sebastian Mendel
Chris W schrieb: I have the following query... SELECT c.NLCID, n.publishdate FROM newsletter n JOIN newslettersection s using (NLID) JOIN newslettercontent c using(NLCID) WHERE contenttype = 1 AND n.publishdate AND c.`timestamp` = '-00-00 00:00:00' I want to run an update on newslettercon

Re: Update select fields in all rows

2004-09-13 Thread Andrew Kreps
On Tue, 14 Sep 2004 01:07:53 -0400, Seth <[EMAIL PROTECTED]> wrote: > I am fairly new to MySQL and I have been trying to form a way to have select rows > numbers put back to 0, sort of like a reset in some rows of the table. > > The table is ladder_1 and I am trying to have the fields > rank,lra

Re: UPDATE ... SELECT FROM ... :)

2002-12-05 Thread Michael T. Babcock
On Wed, Dec 04, 2002 at 04:32:35PM -0500, Michael T. Babcock wrote: > information from "a" to "b". Any ideas for a one-shot SQL command to do this? > I'm about to try selecting everything from "b" and the CommID from "a" as a > join into a temporary table, then "REPLACE" it back into "b". In ca

Re: UPDATE SELECT

2001-09-18 Thread Michael Ayres
Basically mysql doesn't let you use data from one table in updating another table. If you look at the update syntax at http://www.mysql.com/doc/U/P/UPDATE.html you'll notice the lack of a very much needed FROM option. later, mike At 01:14 PM 9/18/2001 +0100, you wrote: >Hi everyone. > >I'm t

Re: UPDATE SELECT

2001-09-18 Thread Ian Barwick
On Tuesday 18 September 2001 14:14, Andrew Dixon wrote: > Hi everyone. > > I'm trying to do the following update, which someone at Macromedia gave me, > however I get a SQL error when I'm trying to use it with MySQL, any ideas > on what is wrong. A general lack of support in MySQL for this kind o