User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » SQL/Plus formatting Page [1]  
1337 b4k4
All American
10033 Posts
user info
edit post

Ok, maybe I'm just dumb, but I can't seem to find the answer to this anywhere. When I make a query using SQL/Plus it returns results with a metric shit ton of extra spaces, even though those spaces aren't stored in the database. For example, if I querry for a list of names I get output that looks like this:


F_NAME
------------------------------------------------------------
JAMES
KENNY
LANDO
MISSY


The F_Name data is a varchar(20), and something similar happens for almost every column. I know I can specify the format of specific columns one at a time in SQL/Plus but is there any way to set them globaly or preferably to have SQL/Plus only output a column as long as it needs to be for the given results?

12/6/2007 12:50:16 AM

BigMan157
no u
103354 Posts
user info
edit post

is there a trim or rtrim function you can use or variable you can set?

12/6/2007 8:58:51 AM

1337 b4k4
All American
10033 Posts
user info
edit post

tried that, it seems to be something that sqlplus is doing in the output. If I change the linesize, the number of extra spaces changes (to a degree) but I can never shrink it down enough.

12/6/2007 10:18:47 AM

tsavla
All American
6787 Posts
user info
edit post

try this out, works for me but now i use toad

Quote :
"
SET NEWPAGE 0
SET SPACE 0
SET LINESIZE 80
SET PAGESIZE 0
SET ECHO OFF
SET FEEDBACK OFF
SET HEADING OFF"

12/6/2007 6:24:16 PM

 Message Boards » Tech Talk » SQL/Plus formatting Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.