OVH Cloud OVH Cloud

UPDATE SET xxx=SELECT Help

1 réponse
Avatar
Patrick Drouin
Hello everyone,

I'm quite new to ACCESS and I have a fairly good knowledge of SQL under
Oracle. I'm trying to run the following query without any luck:

UPDATE M1L
SET M1L.Code_err = (SELECT M1.Code_err
FROM table_temp M1
WHERE M1L.Forme=M1.Forme
AND M1L.PdeD=M1.PdeD
AND M1.Code_Err is not null);


Access gives me a strange error message about not being to update something
with something (I run a French Office) and it's too late for a good
translation. I'm puzzled. Does Access support that kind of query? If not, is
there a work around?

Thanks,
Patrick

1 réponse

Avatar
Daniel Carollo
Hello Patrick!

We speak French around here...

Rather try this:

UPDATE M1L
SET M1L.Code_err = M1.Code_err
FROM table_temp M1 INNER JOIN M1L
ON (M1L.Forme=M1.Forme AND M1L.PdeD=M1.PdeD AND M1.Code_Err is not null);

The last condition might not be necessary...

Good luck!

--
Daniel :-)

Computing Technologies International - www.computing-tech.com - We
provide solutions...

"Patrick Drouin" wrote in message
news:sAogb.114780$
Hello everyone,

I'm quite new to ACCESS and I have a fairly good knowledge of SQL under
Oracle. I'm trying to run the following query without any luck:

UPDATE M1L
SET M1L.Code_err = (SELECT M1.Code_err
FROM table_temp M1
WHERE M1L.Forme=M1.Forme
AND M1L.PdeD=M1.PdeD
AND M1.Code_Err is not null);


Access gives me a strange error message about not being to update
something

with something (I run a French Office) and it's too late for a good
translation. I'm puzzled. Does Access support that kind of query? If not,
is

there a work around?

Thanks,
Patrick