Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

problem with a computed field result

2 posts in Objects Last posting was on 2009-09-13 09:41:47.0Z
TonyMIS Posted on 2009-09-11 15:33:10.0Z
From: TonyMIS <aesteves@bostonfinancial.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: problem with a computed field result
Date: Fri, 11 Sep 2009 08:33:10 -0700 (PDT)
Organization: http://groups.google.com
Lines: 17
Message-ID: <325bf524-2484-4252-ab15-7fcf6e0fae3e@37g2000yqm.googlegroups.com>
NNTP-Posting-Host: 209.0.112.9
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: posting.google.com 1252683190 27461 127.0.0.1 (11 Sep 2009 15:33:10 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 11 Sep 2009 15:33:10 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 37g2000yqm.googlegroups.com; posting-host=209.0.112.9; posting-account=XF6ckgoAAACs7hQvjds3XT2_H3YZR6k7
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; InfoPath.1),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!novia!news-out.readnews.com!news-xxxfer.readnews.com!postnews.google.com!37g2000yqm.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9893
Article PK: 737022

Hello
Powerbuilder 11.1 build 8123/ms sql server backend

I built a computed field that finds the difference between a few
fields. They are all the same datatype. The result of this formula
should be 0 for most of the records. Unfortunately, in format
[GENERAL] the result is an exponential i.e.1.343434343434E9. When I
change the format to SHARES it prints 0.0000 for those records. The
problem is with the filter I have. I only want the dw to display
records where the result of the formula is not 0. The filter won't
work at all. I believe it is reading the [GENERAL] format result set.
Why is this happening and is there an easy solution?

any help is greatly appreciated.

Thanks
Tony


Jeremy Lakeman Posted on 2009-09-13 09:41:47.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: problem with a computed field result
Date: Sun, 13 Sep 2009 02:41:47 -0700 (PDT)
Organization: http://groups.google.com
Lines: 21
Message-ID: <0a60404d-b155-4f1d-b441-99a7795183dd@v15g2000prn.googlegroups.com>
References: <325bf524-2484-4252-ab15-7fcf6e0fae3e@37g2000yqm.googlegroups.com>
NNTP-Posting-Host: 122.49.174.135
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1252834907 2146 127.0.0.1 (13 Sep 2009 09:41:47 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sun, 13 Sep 2009 09:41:47 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: v15g2000prn.googlegroups.com; posting-host=122.49.174.135; posting-account=euaBtgoAAAC_vDxfsxmpMKlBxHaHpmRS
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!v15g2000prn.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9895
Article PK: 737024


On Sep 12, 12:33 am, TonyMIS <aeste...@bostonfinancial.com> wrote:
> Hello
> Powerbuilder 11.1 build 8123/ms sql server backend
>
> I built a computed field that finds the difference between a few
> fields. They are all the same datatype.  The result of this formula
> should be 0 for most of the records. Unfortunately, in format
> [GENERAL] the result is an exponential i.e.1.343434343434E9.  When I
> change the format to SHARES it prints 0.0000 for those records.  The
> problem is with the filter I have.  I only want the dw to display
> records where the result of the formula is not 0. The filter won't
> work at all. I believe it is reading the [GENERAL] format result set.
> Why is this happening and is there an easy solution?
>
> any help is greatly appreciated.
>
> Thanks
> Tony

So you're using imprecise floating point math.
Use round([compute],4) in your filter expression.