Error in update query

M

morgan

Hi everyone,
I have the following query to update a table but it returns an error that
sounds something like that: <It's not possible to repete the name of table
"T_CC_comune" in the FROM clause>. (My Access version is in Italian)
What is wrong?

UPDATE T_CC_comune, T_CC_comune SET T_CC_comune.Causale = "STIPENDIO
GLORIA", T_CC_comune.[Centro Costo] = "stipendio gloria"
WHERE (((T_CC_comune.Causale) Like "*stipendio*") AND
((T_CC_comune.Descrizione) Like "*gloria*") AND ((T_CC_comune.[Data
Operazione]) Between Date() And DateAdd("m",-2,Date())));
 
A

Allen Browne

Try:
UPDATE T_CC_comune
SET T_CC_comune.Causale = "STIPENDIO GLORIA",
T_CC_comune.[Centro Costo] = "stipendio gloria"
WHERE ...

It's acutally the UPDATE clause, but the table you are updating must be
shown once only (even though you are updating 2 fields.)
 
M

morgan

Thks Allen. It works in this way.

Allen Browne said:
Try:
UPDATE T_CC_comune
SET T_CC_comune.Causale = "STIPENDIO GLORIA",
T_CC_comune.[Centro Costo] = "stipendio gloria"
WHERE ...

It's acutally the UPDATE clause, but the table you are updating must be
shown once only (even though you are updating 2 fields.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

morgan said:
Hi everyone,
I have the following query to update a table but it returns an error that
sounds something like that: <It's not possible to repete the name of table
"T_CC_comune" in the FROM clause>. (My Access version is in Italian)
What is wrong?

UPDATE T_CC_comune, T_CC_comune SET T_CC_comune.Causale = "STIPENDIO
GLORIA", T_CC_comune.[Centro Costo] = "stipendio gloria"
WHERE (((T_CC_comune.Causale) Like "*stipendio*") AND
((T_CC_comune.Descrizione) Like "*gloria*") AND ((T_CC_comune.[Data
Operazione]) Between Date() And DateAdd("m",-2,Date())));
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Syntax 1
query date 3
How to query data on monthly basis 3
query on date 1
query to show where no data in a stated column 0
Access update query 2
Query the same table three times 0
update query 2

Top