February 20, 2002 at 8:50 am
Simple question on Formating Money data type. Any help will be appreciated.
Used to format amounts to show decimals using SLQ6.5, like '$#,#00.00'.
If amount was a whole number it showed with .00, 245 showed as $245.00
Now, I am using SQL 2K and the amounts in my table show the whole number 345 instead of 345.00.
I tried to use the same format I use to set in SQL6.5 and it was rejected by SQL 2K. Maybe is the driver!!!! Any suggestions how can I get this amounts to show in my table including the decimals?
If I am using a query, the amount shows the .00 at the end.
Thank you.
February 20, 2002 at 9:56 am
This should be dependent on your client program. What driver/data access method are you using?
Steve Jones
February 20, 2002 at 10:26 am
Make sure the column is of the type money or smallmoney. When I do this I get output with .0000 which is standard. To get #,#00.00 I use CONVERT(VARCHAR,fldName,1) in my Query.
February 20, 2002 at 10:27 am
Thanks Steve. This my environmet. Server is Windows 2K server SP2, SQL2K SP2. My client is Windows 2K Professional. Using OLE DB
February 20, 2002 at 10:32 am
Thanks Antares,
My column is Money. If I run a query against my table everything looks fine, the query result shows the amount including the decimal for every amount in the column.
I used the Convert function to change the amount in the store proc to make sure my client recive the data as they requested.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply