Subject | Re: [firebird-support] Old-style left join |
---|---|
Author | Ranando King |
Post date | 2005-03-08T19:56:04Z |
Try this:
SELECT
RTG.Kuupaev,
RTG.PaH,
RTG.OhH,
RTG.OoH,
RTG.NormH,
RTG.UusVah,
RTG.VahPaevi,
Vah.Nimi,
Vah.AlgKell,
CAST(RTG.Kuupaev + Vah.AlgKell+(Vah.Kestus/1440e0) AS TIME) AS LopKell
FROM RepToolepinguGraafik(2005, 3, 5)RTG, TAB_Vahetus Vah
WHERE (Vah.UID = RTG.Vahetus) or (Vah.UID not in
(SELECT Vahetus
FROM RepToolepinguGraafik(2005, 3, 5))
This is all there is to a LEFT JOIN, save for some optizations.
R.
SELECT
RTG.Kuupaev,
RTG.PaH,
RTG.OhH,
RTG.OoH,
RTG.NormH,
RTG.UusVah,
RTG.VahPaevi,
Vah.Nimi,
Vah.AlgKell,
CAST(RTG.Kuupaev + Vah.AlgKell+(Vah.Kestus/1440e0) AS TIME) AS LopKell
FROM RepToolepinguGraafik(2005, 3, 5)RTG, TAB_Vahetus Vah
WHERE (Vah.UID = RTG.Vahetus) or (Vah.UID not in
(SELECT Vahetus
FROM RepToolepinguGraafik(2005, 3, 5))
This is all there is to a LEFT JOIN, save for some optizations.
R.
----- Original Message -----
From: ainpoissee
To: firebird-support@yahoogroups.com
Sent: Tuesday, March 08, 2005 9:18 AM
Subject: [firebird-support] Old-style left join
Hi,
How to rewrite following query to use "old style" left join (join via
where)?
SELECT
RTG.Kuupaev,
RTG.PaH,
RTG.OhH,
RTG.OoH,
RTG.NormH,
RTG.UusVah,
RTG.VahPaevi,
Vah.Nimi,
Vah.AlgKell,
CAST(RTG.Kuupaev + Vah.AlgKell+(Vah.Kestus/1440e0) AS TIME) AS LopKell
FROM RepToolepinguGraafik(2005, 3, 5)RTG
LEFT JOIN TAB_Vahetus Vah ON(Vah.UID = RTG.Vahetus)
I have to join via where as the reporting tool doesn't support JOIN
keyword... :(
TIA
ain
Yahoo! Groups Sponsor
ADVERTISEMENT
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.