Hello there,
i have a Problem with a query.
I have a huge Table with Zipcodes from Germany called 'Postleitzahlen'. There is another table with Companies called 'Firmen'
Structure is like this:
Firmen
------
ID
City
State
ZipCode
Postleitzahlen
--------------
ZipCode
State
Now I want, all empty ( '' or NULL ) State-fields of Firmen updated with their correspendants of Postleitzahlen
That's my actual query:
UPDATE
Firmen
SET
Firmen.State = Postleitzahlen.State
FROM
Postleitzahlen
INNER JOIN
Firmen ON Postleitzahlen.ZipCode = Firmen.ZipCode
WHERE
(
Firmen.State = ''
OR Firmen.State IS NULL )
I get a response with xx affected rows, but in fact, there's nothing updated.
Can someone help me?
Thanks in advance.
- dennis