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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change display order of describe 1

Status
Not open for further replies.

Zahier

MIS
Oct 3, 2002
97
ZA
Goodday techies,

I have been asked an unusual question by our spatial developer. Is it possible to change/customise the display order of the columns when doing a DESCRIBE?
Reason: The Geomedia application uses the describe command to list the column/features, thus he prefers to change the order to suit his users.

Example. It currently does this

SQL> desc user50v.admn_geo
Name Null? Type
--------------------------------- -------------------
FEAT_TYPE_ID NUMBER(10)
EST_REVISION_DATE DATE
GID NOT NULL NUMBER(10)
CUID VARCHAR2(35)
FEATURE_RELIABILITY_DATE DATE
ATTR_RELIABILITY_DATE DATE
CAPTURE_SOURCE_TYPE_ID NUMBER(10)
CAPTURE_METHOD_ID NUMBER(10)
SOURCE_DESCRIPTION VARCHAR2(255)
SOURCE_CURRENCY DATE
SOURCE_ACCURACY FLOAT(126)

But he wants this:

FEATURE_RELIABILITY_DATE DATE
CAPTURE_SOURCE_TYPE_ID NUMBER(10)
CAPTURE_METHOD_ID NUMBER(10)
GID NOT NULL NUMBER(10)
CUID VARCHAR2(35)
SOURCE_DESCRIPTION VARCHAR2(255)
SOURCE_CURRENCY DATE
SOURCE_ACCURACY FLOAT(126)
FEAT_TYPE_ID NUMBER(10)
EST_REVISION_DATE DATE
ATTR_RELIABILITY_DATE DATE
 
I had a look at dba_tab_columns and see it is ordered by COLUMN_ID. Is it advisable to change the ID of the table's columns to suit the user? My instincts say there are too many dependencies/relationships to mess with that COLUMN_ID.
 
Apart from re-ordering the columns in the table by dropping and re-creating it, no. You'd need to convert it to a query against SYS.DBA_TABLES instead. You can then order the results howsoever you want.
 
Thank you kindly for the advice. It turns out the Geomedia application does in fact have a method to "re-ordering" the columns.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top