MySQL Forums
Forum List  »  German

SQL Select Problem
Posted by: Hans Wurst
Date: May 28, 2009 08:17AM

Hallo Jungs und Mädels,

Ich habe folgende Abfrage:
SELECT c.entity_id, ca.value, ca2.value
 FROM customer_entity c INNER JOIN customer_address_entity_varchar ca,customer_address_entity_text ca2
 WHERE ca.entity_id = c.entity_id and ca.attribute_id IN (18,20,28,24,26,25,29) AND ca2.entity_id = c.entity_id AND ca2.attribute_id = 23
 GROUP BY c.entity_id, ca.value, ca2.value;

Mit diesem Ergebnis:
1, 'Telefon', 'Adresse'
1, 'PLZ', 'Adresse'
1, 'Nachname', 'Adresse'
1, 'Land', 'Adresse'
1, 'Stadt', 'Adresse'
1, 'Bundesland', 'Adresse'
1, 'Vorname', 'Adresse'

Es soll jedoch so aussehen:
1, Vorname, Nachname, Adresse usw....

Problem ist, dass die Werte jeweils in dem Feld 'value' stehen und nur über entity_id und attribute_id identifiziert werden können.

Ich will die Kundendaten aus Magento exportieren. Kann leider aus technischen Gründen nicht auf die API zurückgreifen....

Bin für jede Hilfe dankbar.

Options: ReplyQuote


Subject
Views
Written By
Posted
SQL Select Problem
3655
May 28, 2009 08:17AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.