Article View: borland.public.interbase.sql
Article #11217left join in TIBDataSet
From: Sergio Gonzalez
Date: Wed, 11 Dec 2002 18:51
Date: Wed, 11 Dec 2002 18:51
28 lines
1763 bytes
1763 bytes
Hi there!
First of all. I don't have a "real" problem.
Actually, it works, but I don't know if this is the best way to do it.
I need to show in a dbgrid the fields of 2 tables.
One of them (COSTO) is the "detail" of another table (tough I think it
doesn't matter here)
I have in a SelectSQL of a TIBDataSet the next instruction
SELECT ID, ID_TCosto, Descripcion, Valor, Accion
FROM COSTO C
LEFT JOIN TCOSTO TC
ON C.ID_TCOSTO = TC.ID_TCOSTO
WHERE C.ID = :ID
1) I didn't specify in which table is each field. Should I?
2) what's the difference with:
SELECT C.ID, C.ID_TCosto, TC.Descripcion, C.Valor, TC.Accion
FROM COSTO C, TCOSTO TC
WHERE C.ID = :ID and C.ID_TCOSTO = TC.ID_TCOSTO
Thank you very much!
Sergio
Technical Details
Message-ID:
<3df789da@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!colt.net!diablo.netcom.net.uk!netcom.net.uk!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 114a0e,809958e3ec144d77,start X-Google-Attributes: gid114a0e,public X-Google-ArrivalTime: 2002-12-11 11:10:06 PST Reply-To: "Sergio Gonzalez" <shg@sion.com> From: "Sergio Gonzalez" <shg@sion.com> Newsgroups: borland.public.interbase.sql Subject: left join in TIBDataSet Date: Wed, 11 Dec 2002 15:51:31 -0300 Lines: 30 Organization: SG X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 200.69.36.19 Message-ID: <3df789da@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1039632858 200.69.36.19 (11 Dec 2002 10:54:18 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!colt.net!diablo.netcom.net.uk!netcom.net.uk!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail