AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Datenbanken [SQL] Zeilenwerte als Spalten ausgeben
Thema durchsuchen
Ansicht
Themen-Optionen

[SQL] Zeilenwerte als Spalten ausgeben

Ein Thema von Reinhardtinho · begonnen am 24. Mär 2009 · letzter Beitrag vom 24. Mär 2009
 
nahpets
(Gast)

n/a Beiträge
 
#3

Re: [SQL] Zeilenwerte als Spalten ausgeben

  Alt 24. Mär 2009, 11:25
Hallo,

versuche es doch mal damit:
SQL-Code:
select
  Article.ArticleNumber,
  Article.EAN,
  Article.Supplier,
  ArticlePropertySize.Value As Size,
  ArticlePropertyColor.Value As Color
from Article,
      ArticleProperty ArticlePropertySize,
      ArticleProperty ArticlePropertyColor
where Article.ArticleNumber = ArticlePropertySize.ArticleNumber and ArticlePropertySize.TypeID = 'Size'
and Article.ArticleNumber = ArticlePropertyColor.ArticleNumber and ArticlePropertyColor.TypeID = 'Color'
Die Tabelle ArticleProperty wird zweimal in das From genommen, um einmal den Satz mit TypeID = Size und einmal den Satz mit TypeID = Color zu lesen.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:11 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz