[quoted text, click to view] On Tue, 24 May 2005 22:53:39 +0100, Ados wrote:
>Hi friends,
>
>Sorry for my not very good English.
>
>I am new in sql server.
>
>I am using sqlmoney to represent the price. First of all I am not sure is it
>good idea or I have to use decimal?
Hi Ados,
Use decimal. The money and smallmoney types are proprietary. There's
nothing wrong with using proprietary features if they have an added
value, but this one hasn't - so use the more portable standard datatypes
instead.
Also, I've read that the money datatypes may exhibit some strange
results from improper rounding (unfortuantely, I have no link
available).
[quoted text, click to view] >And my second question is haw to cut the last 2 digits of sqlmoney (I mean
>for example 12345.1200 to become 12345.12. Of course I can do this later in
>my program, but it is better if I am doing it in SP)
No, it's better to do all presentational issues in the front end. Pass
parameters as native types (decimal as decimal, datetime as datetime,
int as int, ...) and add formatting code in the front-end.
Best, Hugo
--