Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

USER_OBJECTS

Status
Not open for further replies.

arpan

Programmer
Oct 16, 2002
336
IN
I am encountering a very strange problem....when I create the following query in SQL Plus

SELECT * FROM USER_OBJECTS;

then only the records under the OBJECT_NAME column get displayed; the rest of the columns simply get ignored!!! Why is this happening? If I change the query to

SELECT OBJECT_NAME,OBJECT_ID,OBJECT_TYPE FROM USER_OBJECTS;

then again only the records under the OBJECT_NAME column get displayed but if I change the query to

SELECT OBJECT_ID,OBJECT_TYPE,OBJECT_NAME FROM USER_OBJECTS;

then the records of all the 3 columns get displayed!! If the query is changed to

SELECT OBJECT_ID,OBJECT_NAME,OBJECT_TYPE FROM USER_OBJECTS;

then only the records under the OBJECT_ID & OBJECT_NAME columns get displayed!!! Can someone throw some light on this erratic behaviour?

Thanks,

Arpan
 
I may have a solution to your problem. It is simply the way SQL*Plus displays columns. It has to do with what the SET LINESIZE n is set to. Numbers are limited to NUMBER(38) so your Object_ID will be displayed. However, if a text column, like Object_Name is displayed, you can get '--- ...' forevery. Two ways to cure this. One is use a column command like COLUMN OBJECT_NAME FORMAT A30 TRUNC and so on for each Text column. The other is to SET LINESIZE 80 or whatever.

Try this test:

DBSBE> set linesize 300
DBSBE> desc user_tables

Name
---------------------------------------- . . .
TABLE_NAME
TABLESPACE_NAME

DBSBE> set linesize 80
DBSBE> desc user_obects

DBSBE> desc user_objects
Name Null? Type
---------------------------- -------- -------------
OBJECT_NAME VARCHAR2(128)
SUBOBJECT_NAME VARCHAR2(30)
 
Hi,

Thanks for your response. Before posting my question, I had thought that the LINESIZE could be the culprit since when the LINESIZE is set to 80 (which is the default value)

SELECT * FROM USER_OBJECTS;

says 'rows will be truncated'. When the LINESIZE is increased to 260, then the message 'rows will be truncated' was not shown but at the same time, only the records under the OBJECT_NAME column were displayed!! So I don't think LINESIZE is the reason behind this erratic behavior.

I tried out using COLUMN OBJECT_NAME FORMAT A30 TRUNC & then all the records under the columns other than the OBJECT_NAME column were displayed. But I couldn't exactly follow what does COLUMN OBJECT_NAME FORMAT A30 TRUNC do? What does 'A30' mean or what it does? Could you please just explain me this? Also I have noticed that if A30 is changed to A1, still it doesn't make any difference to the output. Why so?

Thanks once again,

Regards,

Arpan
 
In fact sql*plus has some problems with increasing linesize. In some cases resizing(maximaizing) its window may help. Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top