Update Befehlt leert andere Spalten
Hallo Leute, ich habe eine SQL Abfrage, die tut eigentlich was sie soll. Leider leert sie auch Spalten der Tabelle, die NICHT geleert werden sollen, nämlich solche mit link_type = "2", obwohl ich ein UPDATE für link_type ="1" vorgesehen habe. Vielleicht kann mir jemand von euch erklären warum und wie es so funktioniert, dass die anderen Spalten NICHT geleert werden.
UPDATE seo_url a
SET a.meta_title=(
SELECT products_name
FROM products_description b
WHERE a.link_id = b.products_id
AND a.link_type = "1")';
UPDATE seo_url a
SET a.meta_title=(
SELECT products_name
FROM products_description b
WHERE a.link_id = b.products_id
AND a.link_type = "1")';
Please also mark the comments that contributed to the solution of the article
Content-Key: 196430
Url: https://administrator.de/contentid/196430
Printed on: April 25, 2024 at 05:04 o'clock
6 Comments
Latest comment
... soll heißen?
- was hast Du gemacht?
- gibt es in der seo_url Zeilen mit link_type = "1"
- usw. ...
So was ähnliches funktioniert bei mir hervorragend
Gruß Jörg
- was hast Du gemacht?
- gibt es in der seo_url Zeilen mit link_type = "1"
- usw. ...
So was ähnliches funktioniert bei mir hervorragend
UPDATE sales_part_tab sp
SET sp.catalog_desc = (SELECT ip.description
FROM inventory_part ip
WHERE ip.part_no = sp.catalog_no
AND ip.contract = sp.contract)
WHERE sp.contract = '76'
Gruß Jörg