🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #3598

DBGrid one more time ?

#3598
From: Uros Obradovic
Date: Wed, 17 Jul 2002 20:22
27 lines
1672 bytes
Hi guys,
I'm having with DBGrid, actually I would say I don't know how to do
following.

In DBGrid control, I have 4 Columns
- Last Name
- First Name
- Company Name

where Last Name and First Name are from one table, and Company Name from the
other.
Last Name and First Name columns are pointing to LName and FName fields in
Person Table respectively,
but Company Name is in the other table.
I would like to use the following SQL statement and have the results in
Company Name column.

SELECT LName, FName, Name
FROM Person, PersonHistory, Company
WHERE Person.PersonID = PersonHistory.PersonID
AND PersonHistory.CompanyID = Company.CompanyID

How can I do that ?
Hope you understand my question

Thanks
Uros
Technical Details
Message-ID: <3d35d23e$1_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!feed.textport.net!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,b0601243ddb1b151,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-07-17 13:29:59 PST
Reply-To: "Uros Obradovic" <ouros@hotmail.com>
From: "Uros Obradovic" <ouros@hotmail.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: DBGrid one more time ? 
Date: Wed, 17 Jul 2002 13:22:45 -0700
Lines: 29
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: 134.71.141.37
Message-ID: <3d35d23e$1_2@dnews>
X-Trace: dnews 1026937406 134.71.141.37 (17 Jul 2002 13:23:26 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!feed.textport.net!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews