Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How to convert money to carchar

Author  Topic 

reddymade
Posting Yak Master

165 Posts

Posted - 2006-06-07 : 13:12:22
I have the following select:

I need to convert the ItemAmount which is money datatype field.
Can you please tell me how can i convert the money field to varchar, with two decimals (.00)

SELECT ItemName + ' - ' + ItemAmount AS ItemDetail,

Thank you very much for the information.

sanjnep
Posting Yak Master

191 Posts

Posted - 2006-06-07 : 13:15:12
declare @$ money
select @$ = 102
select cast(@$ as varchar(20))

Sanjeev
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-06-08 : 02:42:09
SELECT ItemName + ' - ' + CONVERT(varchar(20), ItemAmount) AS ItemDetail

Kristen
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-06-08 : 03:07:55
If you use front end application, you can do this concatenation there also

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -