Home » SQL & PL/SQL » SQL & PL/SQL » center allignment in the select query
center allignment in the select query [message #244469] Wed, 13 June 2007 01:00 Go to next message
Messages: 168
Registered: December 2005
Senior Member

Can ANY one help me how TO center align the data BY USING SELECT query
e.g., Suppose IN the LENGTH OF the field WHERE i am going TO disply the SELECTed value IS 20 AND the Retrived data LENGTH IS 7
THEN how can we center align this?
Re: center allignment in the select query [message #244472 is a reply to message #244469] Wed, 13 June 2007 01:04 Go to previous message
Messages: 7880
Registered: March 2000
Senior Member
Lpad it with spaces.
The number of spaces is half of (the length of your display-column (20) minus the length of the column contents (length(your_column))
make sure to round the number of spaces.

I'll leave it as an exercise for you how to translate this to sql.

[Updated on: Wed, 13 June 2007 01:05]

Report message to a moderator

Previous Topic: bull collect loop syntax
Next Topic: Is there anything like that?
Goto Forum:

Current Time: Tue Aug 22 15:46:52 CDT 2017

Total time taken to generate the page: 0.05113 seconds