[dba-SQLServer]Connection String

David Emerson davide at dalyn.co.nz
Fri Apr 4 15:37:59 CST 2003


Happy to be corrected :)

David

At 4/04/2003, you wrote:
>David,
>
>Sorry, but I must correct you.  Integer arithmetic ALWAYS truncates!  It
>has been so since the first binary computer.  To round you must, repeat
>MUST, use floating-point numbers.
>
>Charles Wortz
>Software Development Division
>Texas Education Agency
>1701 N. Congress Ave
>Austin, TX 78701-1494
>512-463-9493
>CWortz at tea.state.tx.us
>
>
>
>-----Original Message-----
>From: David Emerson [mailto:davide at dalyn.co.nz]
>Sent: Thursday 2003 Apr 03 18:14
>To: dba-sqlserver at databaseadvisors.com
>Subject: Re: [dba-SQLServer]Connection String
>
>
>Thanks Francisco.
>
>Another thing I found out today was that if you divide an integer by an
>integer SQL will round the result to an integer.  Using the ROUND()
>function doesn't help if you want decimal places.  My solution was to
>CAST
>one of the number as a float.  Another of Microsoft's features?
>
>David
>_______________________________________________
>dba-SQLServer mailing list
>dba-SQLServer at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
>http://www.databaseadvisors.com



More information about the dba-SQLServer mailing list