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 newslettercontent and set its
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
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 (NLID)
:[EMAIL PROTECTED]
Enviado el: MiƩrcoles, 15 de Marzo de 2006 07:22 p.m.
Para: mysql@lists.mysql.com
Asunto: Error 1064: update .select nested.
Dear Sir,
MySQL-4.1.12 on RedHat Linux EL4:
mysql update TABLE1 set FIELD1=(select FIELD2 from TABLE2 where
mysql COLUMN2=
'[EMAIL PROTECTED
07:22 p.m.
Para: mysql@lists.mysql.com
Asunto: Error 1064: update .select nested.
Dear Sir,
MySQL-4.1.12 on RedHat Linux EL4:
mysql update TABLE1 set FIELD1=(select FIELD2 from TABLE2 where
mysql COLUMN2=
'[EMAIL PROTECTED]') where COLUMN1='[EMAIL PROTECTED]';
ERROR 1064
, 2006 10:51 PM
Subject: RE: Error 1064: update .select nested.
AAAUUUGGGHHH!!! You used the dreaded comma separated list !!! ;-)
A more explicit way to write the same thing posted by Sr. Cruz...
update TABLE1 a
INNER JOIN TABLE2 b
on a.id = b.other_id
set a.FIELD1=b.FIELD2
WHERE
Dear Sir,
MySQL-4.1.12 on RedHat Linux EL4:
mysql update TABLE1 set FIELD1=(select FIELD2 from TABLE2 where COLUMN2=
'[EMAIL PROTECTED]') where COLUMN1='[EMAIL PROTECTED]';
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for
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
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,lrank,wins,loss,games,percent,streak,points,kills on all the rows updated back
I have a table called employees on a 3.23.48 server. One of it's
fields is an email address (email) and one is the userid. The primary
key is idnumber. I need to populate the userid field from the email
address field. I can get the userid using:
SELECT
update employees set userid=substring(.
Jason Joines wrote:
I have a table called employees on a 3.23.48 server. One of it's
fields is an email address (email) and one is the userid. The primary
key is idnumber. I need to populate the userid field from the email
address field. I can
To: [EMAIL PROTECTED]
Subject: an update select question
I have a table called employees on a 3.23.48 server. One of it's
fields is an email address (email) and one is the userid. The primary
key is idnumber. I need to populate the userid field from the email
address field. I can get the userid
gerald_clark wrote:
update employees set userid=substring(.
Jason Joines wrote:
I have a table called employees on a 3.23.48 server. One of it's
fields is an email address (email) and one is the userid. The primary
key is idnumber. I need to populate the userid field from the email
Hello All,
What syntax for MySQL should I be looking at to solve a problem like
the following:
3 Tables (oversimplified to show the problem area)
individual.id
individual.name
individual_addresses.individual_id
individual_addresses.address_id
address.id
address.street
Although the structure is
wants to know how to do an UPDATE ... SELECT FROM ...,
I did the equivalent of:
BEGIN;
ALTER TABLE b ADD Col3 ...;
CREATE TABLE CopyCol3
SELECT b.id, b.Col1, b.Col2, a.Col3
FROM b
LEFT JOIN a
ON a.id = b.id;
REPLACE INTO b (Col1, Col2, Col3)
SELECT *
FROM
I have a table a with:
ItemID int unsigned not null,
CommID int unsigned not null
I have a table b with:
ItemID int unsigned not null
I want to move CommID from table a to table b. I've updated my schema
to have CommID in b as well for now, and changed my code to insert the
value into table
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.
update general_users
set rolling_total = sumUsr.rollingTotal
from
(
select
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 of
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
i need to update a row of a table taking the values of a "select ... from table1,
table2 where table1.row=table2.row group by row" query.
say:
desc source_table;
key int(10) FK
column_source timestamp
desc table_to_update;
key int(10)
column_to_update
20 matches
Mail list logo