🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #629

Select First 2 Fields

#629
From: Serra
Date: Thu, 06 Sep 2007 13:04
18 lines
1362 bytes
IB 6,02

I'm created a LookUp form
with   SqlQuery,DSP,CDS ,  i want to
get  first two fields of releated tables( Parts,Customers,Vendors.)

for example :
MyQuery:='SELECT FIRST 2 FIELDS FROM '+ ComboBox1.Text
SqlQuery.Sql.Add(MyQuery);
Cds1.Open;
if combobox.text='Parts then
i want to get PartNo, PartName
if combobox.text='Customers then
i want to get CustNo, CustName
....
Is it Possible to select just first 2 fields of a table ?

Thank you. 
Technical Details
Message-ID: <46dffaf3@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,a3faacd9a13e8f53,start
X-Google-Attributes: gid114a0e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Serra" <nomail@nomail.com>
Newsgroups: borland.public.interbase.sql
Subject: Select First 2 Fields
Date: Thu, 6 Sep 2007 16:04:17 +0300
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 81.214.131.112
Message-ID: <46dffaf3@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1189083891 81.214.131.112 (6 Sep 2007 06:04:51 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail