Hi all,
By default all the values in the result set are left aligned. But
I want to align a column in a result set of a query to right side...
Is it possible in SQL?
Example:
Charges
11145.00
171.00
26.00
6.00
Result should be
Charges
11145.00
171.00
26.00
6.00
Please advise
Thanks,
Souraselect str(charges,10,2) from tb
-oj
"SouRa" <SouRa@.discussions.microsoft.com> wrote in message
news:AFB802C8-4C26-43CA-A1A4-3F9AF28EF8EB@.microsoft.com...
> Hi all,
> By default all the values in the result set are left aligned. But
> I want to align a column in a result set of a query to right side...
> Is it possible in SQL?
> Example:
> Charges
> 11145.00
> 171.00
> 26.00
> 6.00
> Result should be
> Charges
> 11145.00
> 171.00
> 26.00
> 6.00
> Please advise
> Thanks,
> Soura|||Hi
This is really dependent on the client tool, for example SQL Server
Management studio has an option to right align numeric values in the results
to text option settings.
John
"SouRa" wrote:
> Hi all,
> By default all the values in the result set are left aligned. But
> I want to align a column in a result set of a query to right side...
> Is it possible in SQL?
> Example:
> Charges
> 11145.00
> 171.00
> 26.00
> 6.00
> Result should be
> Charges
> 11145.00
> 171.00
> 26.00
> 6.00
> Please advise
> Thanks,
> Soura
Showing posts with label align. Show all posts
Showing posts with label align. Show all posts
Friday, March 23, 2012
Right Alignment in SQL
Hi all,
By default all the values in the result set are left aligned. But
I want to align a column in a result set of a query to right side...
Is it possible in SQL?
Example:
Charges
11145.00
171.00
26.00
6.00
Result should be
Charges
11145.00
171.00
26.00
6.00
Please advise
Thanks,
Souraselect str(charges,10,2) from tb
--
-oj
"SouRa" <SouRa@.discussions.microsoft.com> wrote in message
news:AFB802C8-4C26-43CA-A1A4-3F9AF28EF8EB@.microsoft.com...
> Hi all,
> By default all the values in the result set are left aligned. But
> I want to align a column in a result set of a query to right side...
> Is it possible in SQL?
> Example:
> Charges
> 11145.00
> 171.00
> 26.00
> 6.00
> Result should be
> Charges
> 11145.00
> 171.00
> 26.00
> 6.00
> Please advise
> Thanks,
> Soura|||Hi
This is really dependent on the client tool, for example SQL Server
Management studio has an option to right align numeric values in the results
to text option settings.
John
"SouRa" wrote:
> Hi all,
> By default all the values in the result set are left aligned. But
> I want to align a column in a result set of a query to right side...
> Is it possible in SQL?
> Example:
> Charges
> 11145.00
> 171.00
> 26.00
> 6.00
> Result should be
> Charges
> 11145.00
> 171.00
> 26.00
> 6.00
> Please advise
> Thanks,
> Soura|||how do i enter a new question?
i click new and nothing happens
--
thank you
ms. soto
"SouRa" wrote:
> Hi all,
> By default all the values in the result set are left aligned. But
> I want to align a column in a result set of a query to right side...
> Is it possible in SQL?
> Example:
> Charges
> 11145.00
> 171.00
> 26.00
> 6.00
> Result should be
> Charges
> 11145.00
> 171.00
> 26.00
> 6.00
> Please advise
> Thanks,
> Soura|||Hi
That will depend on how you are using the newsgroup, for instance if you are
using the technet communities
http://www.microsoft.com/technet/community/newsgroups/server/sql.mspx you
will need to create a profile and use a passport to sign in before adding new
messages or replying to existing messages. As you can reply then it looks
like you have this, in which case you would need to select the new button
which is just beneath the "search for:" area. If you are using Outlook
Express choose the New Post button or File/New/News Message from the menu.
HTH
John
"ms. soto" wrote:
> how do i enter a new question?
> i click new and nothing happens
> --
> thank you
> ms. soto
>
> "SouRa" wrote:
> > Hi all,
> >
> > By default all the values in the result set are left aligned. But
> > I want to align a column in a result set of a query to right side...
> > Is it possible in SQL?
> >
> > Example:
> >
> > Charges
> > 11145.00
> > 171.00
> > 26.00
> > 6.00
> >
> > Result should be
> >
> > Charges
> > 11145.00
> > 171.00
> > 26.00
> > 6.00
> >
> > Please advise
> >
> > Thanks,
> > Soura
By default all the values in the result set are left aligned. But
I want to align a column in a result set of a query to right side...
Is it possible in SQL?
Example:
Charges
11145.00
171.00
26.00
6.00
Result should be
Charges
11145.00
171.00
26.00
6.00
Please advise
Thanks,
Souraselect str(charges,10,2) from tb
--
-oj
"SouRa" <SouRa@.discussions.microsoft.com> wrote in message
news:AFB802C8-4C26-43CA-A1A4-3F9AF28EF8EB@.microsoft.com...
> Hi all,
> By default all the values in the result set are left aligned. But
> I want to align a column in a result set of a query to right side...
> Is it possible in SQL?
> Example:
> Charges
> 11145.00
> 171.00
> 26.00
> 6.00
> Result should be
> Charges
> 11145.00
> 171.00
> 26.00
> 6.00
> Please advise
> Thanks,
> Soura|||Hi
This is really dependent on the client tool, for example SQL Server
Management studio has an option to right align numeric values in the results
to text option settings.
John
"SouRa" wrote:
> Hi all,
> By default all the values in the result set are left aligned. But
> I want to align a column in a result set of a query to right side...
> Is it possible in SQL?
> Example:
> Charges
> 11145.00
> 171.00
> 26.00
> 6.00
> Result should be
> Charges
> 11145.00
> 171.00
> 26.00
> 6.00
> Please advise
> Thanks,
> Soura|||how do i enter a new question?
i click new and nothing happens
--
thank you
ms. soto
"SouRa" wrote:
> Hi all,
> By default all the values in the result set are left aligned. But
> I want to align a column in a result set of a query to right side...
> Is it possible in SQL?
> Example:
> Charges
> 11145.00
> 171.00
> 26.00
> 6.00
> Result should be
> Charges
> 11145.00
> 171.00
> 26.00
> 6.00
> Please advise
> Thanks,
> Soura|||Hi
That will depend on how you are using the newsgroup, for instance if you are
using the technet communities
http://www.microsoft.com/technet/community/newsgroups/server/sql.mspx you
will need to create a profile and use a passport to sign in before adding new
messages or replying to existing messages. As you can reply then it looks
like you have this, in which case you would need to select the new button
which is just beneath the "search for:" area. If you are using Outlook
Express choose the New Post button or File/New/News Message from the menu.
HTH
John
"ms. soto" wrote:
> how do i enter a new question?
> i click new and nothing happens
> --
> thank you
> ms. soto
>
> "SouRa" wrote:
> > Hi all,
> >
> > By default all the values in the result set are left aligned. But
> > I want to align a column in a result set of a query to right side...
> > Is it possible in SQL?
> >
> > Example:
> >
> > Charges
> > 11145.00
> > 171.00
> > 26.00
> > 6.00
> >
> > Result should be
> >
> > Charges
> > 11145.00
> > 171.00
> > 26.00
> > 6.00
> >
> > Please advise
> >
> > Thanks,
> > Soura
Right Align Dollar Signs
Hello Everyone,
Does anyone know where I can go to get the format to make
$ right align + =Sum(Fields!Blah.Blah) as #,###.00?
||
|$ 23.00|
|$ 1,000.00|
||
I can not figure out how to get the dollars to right align like Excel ?
Please point me to the answer or a previous post that answers this...
Make two separate columns. The first column can have dollar signs and then make the right column right aligned with the number formating of N (Right click on the cell, go to properties. Click on the format tab and type "N" in Format Code)|||Is this to apply to a Matrix?|||Thanks for the quick answer....Hope next version has a better solution...
Subscribe to:
Posts (Atom)