Article View: borland.public.cppbuilder.database.ado
Article #4127Re: Outer join
From: Lee Gan
Date: Thu, 21 Mar 2002 15:03
Date: Thu, 21 Mar 2002 15:03
41 lines
2157 bytes
2157 bytes
You might want to use an INNER JOIN for your query. In your case SELECT a.Name, b.Type from a, b WHERE a.ID = b.RecordID; or SELECT a.Name, b.Type from a INNER JOIN b ON a.ID = b.RecordID Good luck. Lee Gan "MP" <mpeterka@quick.cz> wrote in message news:3c999534_2@dnews... > Hi all, > I'm using C++Builder 5 and ADO. I'm joining two tables with LEFT OUTER > JOIN, for example: > > SELECT a.Name, b.Type FROM TableA a LEFT OUTER JOIN TableB b ON b.RecordID = > a.ID. > > The result is shown in a data-aware grid and I need to edit the data. But > there are some rows from TableA which don't have corresponding row in > TableB. In this case I need to disable editing the field from TableB (the > value in grid is NULL and I cannot recognize, if there is row in the > underlying TableB with NULL value in this field or the row in TableB doesn't > exist). > > How can I solve it? > Thanks. > > Sorry for my poor English. > -- > Ing. Miloslav Peterka > programmer > ELSYST Engineering > http://www.el-soft.cz > > > --- > Odchoz� zpr�va neobsahuje viry. > Zkontrolov�no antivirov�m syst�mem AVG (http://www.grisoft.cz). > Verze: 6.0.313 / Virov� b�ze: 174 - datum vyd�n�: 2.1.2002 > >
Technical Details
Message-ID:
<3c99f65b$1_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!peer1-sjc1.usenetserver.com!usenetserver.com!gestalt.direcpc.com!news.stealth.net!news.stealth.net!fu-berlin.de!news.boerde.de!nntp.cs.uni-magdeburg.de!PeerFeed.KWeb.on.ca!dnewsReferences:
<3c999534_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,a9c5c5a97f694c1f X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-03-21 07:06:54 PST From: "Lee Gan" <leegan@hotmail.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3c999534_2@dnews> Subject: Re: Outer join Date: Thu, 21 Mar 2002 08:03:53 -0700 Lines: 43 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 NNTP-Posting-Host: 207.34.102.197 Message-ID: <3c99f65b$1_2@dnews> X-Trace: dnews 1016723035 207.34.102.197 (21 Mar 2002 07:03:55 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!peer1-sjc1.usenetserver.com!usenetserver.com!gestalt.direcpc.com!news.stealth.net!news.stealth.net!fu-berlin.de!news.boerde.de!nntp.cs.uni-magdeburg.de!PeerFeed.KWeb.on.ca!dnews