*
*
*
*
ForumsRegister | Login 
Subject: Output
Prev Next
You are not authorized to post a reply.

AuthorMessages
stepanUser is Offline
Member
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
dnnstuffadminUser is Offline
DNNStuff Founder
Site Member
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
stepanUser is Offline
Member
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?
dnnstuffadminUser is Offline
DNNStuff Founder
Site Member
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
You are not authorized to post a reply.



ActiveForums 3.6
DotNetNuke Sponsor
Copyright (c) 2005-2008 DNNStuff
*
Terms Of Use   Privacy Statement