Home » Applications » Oracle Fusion Apps & E-Business Suite » Query Description Table Fields
Query Description Table Fields [message #339957] Sun, 10 August 2008 06:25 Go to next message
daniloviz
Messages: 6
Registered: August 2008
Junior Member
Hello,
I was wandering...
Which kind of query can be ran to get the description of the fields of a table?

Thank you
BR
Re: Query Description Table Fields [message #339981 is a reply to message #339957] Sun, 10 August 2008 14:23 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
DESCRIBE (in SQL*Plus)?
SQL> desc dept
 Name                                      Null?    Type
 ----------------------------------------- -------- -----------------

 DEPTNO                                    NOT NULL NUMBER(2)
 DNAME                                              VARCHAR2(14)
 LOC                                                VARCHAR2(13)

SQL>

Or do you have something else in mind?
Re: Query Description Table Fields [message #339988 is a reply to message #339981] Sun, 10 August 2008 15:32 Go to previous messageGo to next message
daniloviz
Messages: 6
Registered: August 2008
Junior Member
Actually I was looking for a query executed for example on the table FND_USER that generate an output of this kind

Name          Null?    Type           Description 
------------- -------- -------------- --------------------------------------
USER_ID  (PK) NOT NULL NUMBER(15)     Application user identifier 
USER_NAME     NOT NULL VARCHAR2(100)  Application username (what a user types in at the Oracle Applications sign–on screen) 



Thank you
BR
Re: Query Description Table Fields [message #340030 is a reply to message #339988] Mon, 11 August 2008 02:05 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I see; here's an example:
SQL> create table a1_test
  2  (id    number(3),
  3   ime   varchar2(20));

Table created.

SQL> comment on column a1_test.ime is 'this is a name';

Comment created.

SQL> select c.column_name, c.data_type, c.nullable, m.comments
  2  from user_tab_columns c, user_col_comments m
  3  where c.table_name = 'A1_TEST'
  4    and m.table_name = c.table_name
  5    and m.column_name = c.column_name;

COLUMN_NAME                    DATA_TYPE       N COMMENTS
------------------------------ --------------- - ------------------------------
ID                             NUMBER          Y
IME                            VARCHAR2        Y this is a name

SQL>

Now that you know where to search for, you may write your own query (i.e. add or remove certain information).
Re: Query Description Table Fields [message #340046 is a reply to message #339957] Mon, 11 August 2008 03:35 Go to previous messageGo to next message
daniloviz
Messages: 6
Registered: August 2008
Junior Member
Hello,
thank you for your reply.
Actually I was not looking for the comments related to each field of a customized table, but for the Oracle default description of the fields.
I was reading about these descriptions in a manual that I cannot find anymore.
Now the point is if this information can be somehow extracted form the DB using a query.

Thank you
BR
Re: Query Description Table Fields [message #340050 is a reply to message #340046] Mon, 11 August 2008 04:09 Go to previous message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Did you try to substitute "my" table name with "FND_USER"? Also, if there's nothing there, try with ALL_TAB_COLUMNS and ALL_TAB_COMMENTS (instead of USER_...).

If none of this helps, I'm afraid I'm unable to help you any further.
Previous Topic: Single receipt against multiple invoices from different customers
Next Topic: How to do pick release using API
Goto Forum:
  


Current Time: Thu Dec 08 16:23:05 CST 2016

Total time taken to generate the page: 0.10070 seconds