🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Problem with expression in Select Statement.

#11293
From: Jignesh Doshi
Date: Tue, 26 Nov 2002 23:57
17 lines
1491 bytes
"Select (SUM(ARCKDT - ARDUED)/COUNT(*)) as AVGDAYSLOW from ARMAST"

ARCKDT & ARDUED are TDatefield.

I am using this SQL to calculate this number & query executes without any
error. Now I want to show this number on the screen. But when I try the
following statement I get this error : "Cannot acces field 'AVGDAYSLOW' as
type float".

lblavgdayslow.Caption :=
FloattoStrf(Qry_.FieldByName('AVGDAYSLOW').AsFloat,ffnumber,5,2);

Please anyone have any suggestions...

Thanks..

Jignesh
Technical Details
Message-ID: <3de40a49@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 114a0e,b0bfdad1c5342f2e,start
X-Google-Attributes: gid114a0e,public
X-Google-ArrivalTime: 2002-11-26 16:07:56 PST
Reply-To: "Jignesh Doshi" <jdoshi@reliablegroup.com>
From: "Jignesh Doshi" <jdoshi@reliablegroup.com>
Newsgroups: borland.public.interbase.sql
Subject: Problem with expression in Select Statement.
Date: Tue, 26 Nov 2002 18:57:49 -0500
Lines: 20
Organization: Reliable Group
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 24.184.178.84
Message-ID: <3de40a49@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1038355017 24.184.178.84 (26 Nov 2002 15:56:57 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail