Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Know Your Data Expand / Collapse
Author
Message
Posted Thursday, March 24, 2005 3:11 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, June 22, 2011 8:36 AM
Points: 28, Visits: 6
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/rcarlson/knowyourdata.asp


Post #170010
Posted Monday, April 4, 2005 10:34 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Monday, September 29, 2014 2:44 PM
Points: 3,475, Visits: 583

Totally agree. Just had a similar task. I used multiplying by 1.00 and then used Convert to make the output look nice for the report

Convert(decimal(7,3),Orders*1.00/mytotal)

Yelena




Regards,
Yelena Varshal

Post #171865
Posted Monday, April 18, 2005 5:47 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, April 4, 2006 11:03 PM
Points: 2, Visits: 1

Article provides good insight. I found this issue while I was trying to write a big stored procedure to run complex calcualtions.

I did not know the adding or subtracting .0 technique .

I created temporary variables of decimal type and reassigned values to these variables and used them in my calculation. But adding .0 would have been far more simpler and efficient.

Raja

 

 

Post #175284
Posted Tuesday, April 4, 2006 7:52 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Tuesday, November 18, 2014 12:29 PM
Points: 1,945, Visits: 3,121
Needs to add information about the problems with the proprietary MONEY and BIT data types. Needs to learn to use CAST() and not CONVERT() when coding.


Books in Celko Series for Morgan-Kaufmann Publishing
Analytics and OLAP in SQL
Data and Databases: Concepts in Practice
Data, Measurements and Standards in SQL
SQL for Smarties
SQL Programming Style
SQL Puzzles and Answers
Thinking in Sets
Trees and Hierarchies in SQL
Post #270849
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse