Friday, March 30, 2012

Output !

I have a colunms which contain all the numeric data I want to change the
format in the runtime like
145263 that should be like 145,263.
Is there any way to do through sql query?
Thanks
Formatting is typically better off done on the client side.
Otherwise, you need to convert or cast the value to money to
get what you are after. Something like:
DECLARE @.YourValue integer
SET @.YourValue = 145263
SELECT reverse(substring(reverse(convert(varchar, cast
(@.YourValue as money), 1)),
4, 30))
-Sue
On Mon, 23 Jan 2006 14:00:54 -0500, "Rogers"
<naissani@.hotmail.com> wrote:

>I have a colunms which contain all the numeric data I want to change the
>format in the runtime like
>145263 that should be like 145,263.
>Is there any way to do through sql query?
>Thanks
>
|||Thanks dear !
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:nagat119buf4sdbmbfnq3o035ag2am0g19@.4ax.com...
> Formatting is typically better off done on the client side.
> Otherwise, you need to convert or cast the value to money to
> get what you are after. Something like:
> DECLARE @.YourValue integer
> SET @.YourValue = 145263
> SELECT reverse(substring(reverse(convert(varchar, cast
> (@.YourValue as money), 1)),
> 4, 30))
> -Sue
> On Mon, 23 Jan 2006 14:00:54 -0500, "Rogers"
> <naissani@.hotmail.com> wrote:
>
sql

No comments:

Post a Comment