Home » SQL & PL/SQL » SQL & PL/SQL » want SQL or PLSQL procedure to make a column as right justified (Merged)
icon8.gif  want SQL or PLSQL procedure to make a column as right justified (Merged) [message #322773] Mon, 26 May 2008 03:45 Go to next message
chandu_imax
Messages: 46
Registered: May 2008
Location: Hyderabad
Member
Sad i am having the doubt, that one table column name is having
the right justify as '0' , i want to make the right justify for that column as '1'. how i can proceed for that?


i am very thankful to all of you, if you will make the help....

Re: WANT TO MAKE A COLUMN AS RIGHT JUSTIFY [message #322776 is a reply to message #322773] Mon, 26 May 2008 03:50 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It depends on tool you are using and column datatype. (I must admit that I don't understand what "as 0" and "as 1" mean). Possible solutions are use of the TO_CHAR function so that you could format numbers (and right align them), clicking the "align right" button etc.
want SQL or PLSQL procedure to make a column as right justified [message #322793 is a reply to message #322773] Mon, 26 May 2008 04:37 Go to previous messageGo to next message
chandu_imax
Messages: 46
Registered: May 2008
Location: Hyderabad
Member
Sad
hi,

i want to write a script for changing a column from left justify to right justify.

For example,

Table name : employee

In this table, assume a column "EMPNAME" is left justified when that table is created. But, now we want that column to be right justified. For that we want a sql or plsql procedure.

we are not using any tools. we are expecting the change in the table through the script.

NOTE: table is having some rows. Those rows information also need to change to Right justified.


Thanking you a lot....
Re: want SQL or PLSQL procedure to make a column as right justified [message #322796 is a reply to message #322793] Mon, 26 May 2008 04:41 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Use LPAD

Quote:
we are not using any tools

Of course, you are using one otherwise you can't see the data.

Regards
Michel
Re: want SQL or PLSQL procedure to make a column as right justified [message #322859 is a reply to message #322796] Mon, 26 May 2008 07:51 Go to previous messageGo to next message
chandu_imax
Messages: 46
Registered: May 2008
Location: Hyderabad
Member

We are using TOAD here.

Re: want SQL or PLSQL procedure to make a column as right justified [message #322860 is a reply to message #322859] Mon, 26 May 2008 07:55 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
We are using TOAD here

So is it a TOAD question?

Regards
Michel
Re: want SQL or PLSQL procedure to make a column as right justified [message #322884 is a reply to message #322793] Mon, 26 May 2008 10:53 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
chandu_imax wrote on Mon, 26 May 2008 11:37

Table name : employee

In this table, assume a column "EMPNAME" is left justified when that table is created. But, now we want that column to be right justified. For that we want a sql or plsql procedure.

we are not using any tools. we are expecting the change in the table through the script.

NOTE: table is having some rows. Those rows information also need to change to Right justified.

chandu_imax wrote on Mon, 26 May 2008 14:51

We are using TOAD here.



Any idea what the T in TOAD stands for?

Anyway, you have the wrong idea about tables and columns. Columns hold data, not formatting. Displaying the contents of a column left-justified, right-justified, upside-down, or whatever is something the tool you use to display the data with does. It is NOT a property of a table or column.
Previous Topic: Optimise Query
Next Topic: Error in if then else condition.
Goto Forum:
  


Current Time: Sat Dec 10 18:54:19 CST 2016

Total time taken to generate the page: 0.09418 seconds