🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Wrong RowCount when select distinct

#2112
From: xiao zhen
Date: Fri, 07 Nov 2003 04:59
27 lines
1660 bytes
Is there no one else meet the same problem?
Ah.....oh...

"xiao zhen" <zhenx@vip.sina.com> д����Ϣ����
:3faa11a9$1@newsgroups.borland.com...
> I am using BCB6 Enterprise + Update4, connect to oracle 8i by ADO.
>
> I have 2 tables
> depts( deptid Number(10) NOT NULL, deptName varchar2(100) )
> has values ( 1, 'aaa' ), (2, 'bbb')
>
> modality( modalityid Number(4) NOT NULL, deptid Number(10) )
> has values ( 1, 1 ), (2, 1), (3, 2), (4,2)
>
> when I use open a TADOQuery object with SQL as
> "select distinct d.deptid, d.deptname from depts d, modality m where
> d.deptid = m.deptid"
>
> the Query->RowCount is 4, not 2!
>
> when I execute the same command by Oracle SQLPlus, result is 2.
>
> who can help me?
>
>
>
>
Technical Details
Message-ID: <3fab26b0$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3faa11a9$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,a1e498625b8e8d37
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-11-06 21:09:13 PST
From: "xiao zhen" <zhenx@vip.sina.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3faa11a9$1@newsgroups.borland.com>
Subject: Re: Wrong RowCount when select distinct
Date: Fri, 7 Nov 2003 12:59:29 +0800
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: 218.19.218.11
Message-ID: <3fab26b0$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1068181168 218.19.218.11 (6 Nov 2003 20:59:28 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail