468,119 Members | 2,069 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,119 developers. It's quick & easy.

Help needed for Data formatting.

Hello all,

I just started using SQL to create a report. I got the syntax working
but I have absolutely no idea of how to format data. Can anyone kindly
look at my code and help me? I thank you in advance.


The code:

SELECT Column1, Column2, Column3

Column 1 Column2 Column3
23.00 a 23a
23.00 b age2

The output I want:
aCol1 aCol2 aCol3
23 a 23a
23 b age2

NOTE: the column headings have to be bolded.

In conclusion, the following is what I want:
.. the column data should be centered
.. how to change column headings and make them bold
.. the numeric value should be set as integer value (i.e. 12) instead
of default double value (i.e. 12.00)
Jun 30 '08 #1
1 1148
SQL Server is not the correct place to format your result set. Formatting
belongs to the client interface.

For the DECIMAL values you can CAST to INTEGER:



Plamen Ratchev

Jun 30 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by William Gill | last post: by
1 post views Thread by ric.castagna | last post: by
4 posts views Thread by hope | last post: by
2 posts views Thread by serge calderara | last post: by
4 posts views Thread by Melissa | last post: by
14 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.