Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft SQL Server > Re: Use of havi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 5 Topic 10994 of 11420
Post > Topic >>

Re: Use of having with additional select

by Seguros Catatumbo <seguroscatatumbo@[EMAIL PROTECTED] > Apr 23, 2008 at 01:49 PM

> 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

The idea is to add all of MONTO1 in CLPF08 and compare that sum with
the lone value in table ARYSAUTO.
My query works, but using the HAVING statement to show up only those
records that have certain difference (we only need big differences,
not measly cents) doesn't work.

Your query executed, but it showed bizarre amounts.

Thanks for your help, i hope that this information is enough to fix
this
 




 5 Posts in Topic:
Use of having with additional select
Seguros Catatumbo <seg  2008-04-23 12:10:34 
Re: Use of having with additional select
Hugo Kornelis <hugo@[E  2008-04-23 21:52:54 
Re: Use of having with additional select
Seguros Catatumbo <seg  2008-04-23 13:49:49 
Re: Use of having with additional select
Hugo Kornelis <hugo@[E  2008-04-24 00:13:58 
Re: Use of having with additional select
"Plamen Ratchev"  2008-04-23 22:14:22 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 8:43:19 CDT 2008.