stepan
 Member Posts:9
 | | 10/19/2007 12:06 AM |
Alert | | I have a column "Price", it's type money, however it look like 1234567. I'd like it would be like 1 234 567. I guess it could be done in XSL. But I don't know where the file is so that I can rewrite it. It is olny written that it is in root. I have never worked with XSL before, so if you could help me a bit I would really appreciate it. Thank you | | | |
|
dnnstuffadmin DNNStuff Founder
 Site Member Posts:1261

 | | 10/19/2007 6:48 AM |
Alert | You could try doing something like this using the convert and replace functions.
DECLARE @var1 money SET @var1 = 1123.45 SELECT REPLACE(CONVERT(varchar(20),@var1,1),',',' ')
If you want to get rid of the trailing .45 just use the LEFT or SUBSTR functions.
| | Richard Edwards DNNStuff Founder | |
|
stepan
 Member Posts:9
 | | 10/22/2007 2:40 AM |
Alert | | Thanks, it works perfectly. However, is there any other way I can format the output in this modul? | | | |
|
dnnstuffadmin DNNStuff Founder
 Site Member Posts:1261

 | | 10/24/2007 5:54 AM |
Alert | Hi Stepan,
Yes, you can use the xsl option to format your data. There were a few others wondering about how to do this so I posted an article here, http://www.dnnstuff.com/Articles/tabid/303/articleType/ArticleView/articleId/131/How-To-Use-and-XSL-file-with-SQLView.aspx
| | Richard Edwards DNNStuff Founder | |
|