Re: Use of having with additional select
- From: Hugo Kornelis <hugo@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 24 Apr 2008 00:13:58 +0200
On Wed, 23 Apr 2008 13:49:49 -0700 (PDT), Seguros Catatumbo wrote:
I can't test because I have no access to your tables and test data, but
try if the followiing does what you need:
Table CLPF08 sample data and relevant field information:
RAMO POLIZA CERVEH CODCOB MONTO1
31 6100265 2 1 20.15
31 6100265 2 2 30.10
31 6100265 2 3 15.02
Table ARYSAUTO sample data and relevant field information:
CERVEH PRIMA
2 65.26
My query shows a 0.01 monetary units of difference, since
20.15+30.10+15.02 is not exactly 65.26
Hi Seguros,
I expect that this is a rounding issue. What data types are the various
columns?
Thanks for your help, i hope that this information is enough to fix
this
No, it isn't. As I already stated in my previous reply, I need to know
the table structure ===> as a CREATE TABLE statement <===. I failed to
include that you also need to include all the constraints, properties,
and indexes (you may omit irrelevant extra columns though).
I also need the sample data ===> as INSERT statements <===. And I need
to know the expected results based on the sample data given.
--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
.
- References:
- Use of having with additional select
- From: Seguros Catatumbo
- Re: Use of having with additional select
- From: Hugo Kornelis
- Re: Use of having with additional select
- From: Seguros Catatumbo
- Use of having with additional select
- Prev by Date: Re: design question - type heirarchy with supertype queries
- Next by Date: Re: The Sql ranking OVERture
- Previous by thread: Re: Use of having with additional select
- Next by thread: Re: Use of having with additional select
- Index(es):
Relevant Pages
|
|