Article View: borland.public.interbase.sql
Article #11274Re: Percentage in Stored Procedure
From: Bojidar Alexandrov
Date: Mon, 02 Dec 2002 12:35
Date: Mon, 02 Dec 2002 12:35
30 lines
1700 bytes
1700 bytes
Will Bonner-May wrote: > Can anyone help? > > I need to work out a score as a percentage within a stored procedure, > I am using the following code but it doesn't seem to work. > > (TOPICCOUNT integer, > TOPICSCOMPLETED integer, > USERSYLLABUSPROGRESS integer) > > ..... > UserSyllabusProgress = (:TopicsCompleted / :TopicCount) * 100; > ..... > > Thanks in advance, > > Will Bonner-May Please read some good sql reference, then Language Reference of Intebase then ask questions here. You have faced the problem that your Database is in Dialect 3 and there is difference with precision of calculations. What exactly... will leave to you to find out. -- Bojidar Alexanrov Kodar Ltd. http://www.Kodar.net
Technical Details
Message-ID:
<3deb53a6@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3deb500b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 114a0e,a766b6afb0ff7831 X-Google-Attributes: gid114a0e,public X-Google-ArrivalTime: 2002-12-02 04:39:04 PST From: "Bojidar Alexandrov" <bojo@kodar.net> Newsgroups: borland.public.interbase.sql References: <3deb500b$1@newsgroups.borland.com> Subject: Re: Percentage in Stored Procedure Date: Mon, 2 Dec 2002 14:35:48 +0200 Lines: 33 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4920.2300 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4920.2300 NNTP-Posting-Host: 213.169.35.65 Message-ID: <3deb53a6@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1038832550 213.169.35.65 (2 Dec 2002 04:35:50 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail