Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

sqlplus column format

Posted on 2002-07-08
4
9,625 Views
Last Modified: 2012-05-05
I want the output to be left justified so I enter

column columnname format a9 justify left

but it does not work...  Can you tell me what am I doing wrong? check the session.

---------------------
SQL> column EMPCODE justify left
SQL> select empcode from empschd
  2  where rownum < 5
  3  /

EMPCOD
------
90296
90296
7616
3324

SQL> column EMPCODE justify right
SQL> /

EMPCOD
------
90296
90296
7616
3324

-----------
0
Comment
Question by:Bajwa
  • 2
  • 2
4 Comments
 
LVL 2

Expert Comment

by:rajeXsh
ID: 7138423
Justify only aligns the heading, not the data
0
 
LVL 5

Author Comment

by:Bajwa
ID: 7138446
How do you justify the data then?
0
 
LVL 2

Accepted Solution

by:
rajeXsh earned 50 total points
ID: 7138461
You'll have to convert all the data to character and use the LPAD or RPAD functions
0
 
LVL 5

Author Comment

by:Bajwa
ID: 7138487
Thanks......
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question