[Ado.net] SQL-String

Thomas Beckert ado.net@glengamoi.com
Tue, 17 May 2005 15:48:28 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_00E0_01C55AF7.DE4A4B40
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

hi liste -

da ich nicht so der sql-crack bin, frag ich erstmal euch, die es sich =
vielleicht locker aus dem ärmel schütteln, bevor ich mir einen =
abbreche:

ich habe zwei tabellen.

table 1:

id    
kurs_titel
...
... unwichtige daten


table 2:

id 
kurs_id (referenz-id zu table 1)
datum
art (hier gibt es den wert view oder anmeldung)


jetzt hätte ich gerne eine tabellenausgabe, gefiltert nach datum von =
bis, die wie folgt aussieht:

kurs_titel    anzahl_view    anzahl_anmeldung

wobei kurs_titel distinct sein sollte ...

wer hat die lösung im ärmel?

:)


gruss-

tom
------=_NextPart_000_00E0_01C55AF7.DE4A4B40
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; =
charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2604" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>hi liste -</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>da ich nicht so der sql-crack bin, frag =
ich erstmal 
euch, die es sich vielleicht locker aus dem ärmel schütteln, bevor =
ich mir einen 
abbreche:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>ich habe zwei tabellen.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>table 1:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>id&nbsp;&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT face=Arial size=2>kurs_titel</FONT></DIV>
<DIV><FONT face=Arial size=2>...</FONT></DIV>
<DIV><FONT face=Arial size=2>... unwichtige daten</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>table 2:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>id </FONT></DIV>
<DIV><FONT face=Arial size=2>kurs_id (referenz-id zu table =
1)</FONT></DIV>
<DIV><FONT face=Arial size=2>datum</FONT></DIV>
<DIV><FONT face=Arial size=2>art (hier gibt es den wert&nbsp;view 
oder&nbsp;anmeldung)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>jetzt hätte ich gerne eine =
tabellenausgabe, 
gefiltert nach datum von bis, die wie folgt aussieht:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>kurs_titel&nbsp;&nbsp;&nbsp; 
anzahl_view&nbsp;&nbsp;&nbsp; anzahl_anmeldung</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>wobei kurs_titel distinct sein sollte 
...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>wer hat die lösung im =
ärmel?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>:)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>gruss-</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>tom</FONT></DIV></BODY></HTML>

------=_NextPart_000_00E0_01C55AF7.DE4A4B40--