|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, June 22, 2011 8:36 AM
Points: 28,
Visits: 6
|
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Monday, July 30, 2012 10:42 AM
Points: 3,434,
Visits: 519
|
|
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
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, April 04, 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
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Tuesday, January 15, 2013 11:11 AM
Points: 1,945,
Visits: 2,782
|
|
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
|
|
|
|