Home » SQL & PL/SQL » SQL & PL/SQL » View Related Help (Oracle10g)
View Related Help [message #397791] Mon, 13 April 2009 23:25 Go to next message
sr_orcl
Messages: 82
Registered: January 2009
Location: mumbai
Member

Hi,
I have to add comment to View.But Name Of column is rename with different column name .So that I cant compare view columns with base table columns.Can you please tell me in which data dictionary table all the views columns are stored.

Re: View Related Help [message #397795 is a reply to message #397791] Mon, 13 April 2009 23:33 Go to previous messageGo to next message
Michel Cadot
Messages: 64145
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
user/all/dba_tab_columns

Regards
Michel

[Updated on: Mon, 13 April 2009 23:34]

Report message to a moderator

Re: View Related Help [message #397797 is a reply to message #397795] Mon, 13 April 2009 23:45 Go to previous messageGo to next message
sr_orcl
Messages: 82
Registered: January 2009
Location: mumbai
Member

Thanks Michel,
But my assignmetn is not like this.I have to find out all the column name as of base column names used in views.As I renamed all the columns with different user defined name.
Re: View Related Help [message #397807 is a reply to message #397797] Tue, 14 April 2009 00:45 Go to previous messageGo to next message
Michel Cadot
Messages: 64145
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Analyze the view definition.

Regards
Michel
Re: View Related Help [message #397835 is a reply to message #397797] Tue, 14 April 2009 02:34 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
As far as I know, this is going to be a purely manual process.

Assuming that you've got the SQL that you created the view from, then it shouldn't be too hard.
Re: View Related Help [message #398033 is a reply to message #397835] Tue, 14 April 2009 23:52 Go to previous messageGo to next message
sr_orcl
Messages: 82
Registered: January 2009
Location: mumbai
Member

Yes.It is manual process.But my view contains more than 100 columns.S when I changed any column name comments also changed.Is it possible to change name of the view column name using any other way.

Thanks For Your reply
Re: View Related Help [message #398051 is a reply to message #398033] Wed, 15 April 2009 00:41 Go to previous messageGo to next message
Michel Cadot
Messages: 64145
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
Is it possible to change name of the view column name using any other way.

Other way that what? Explain what do you want maybe with an example.

Regards
Michel
Re: View Related Help [message #398070 is a reply to message #398033] Wed, 15 April 2009 02:24 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
What comments?
You can't create Comments on view columns - only on tables, columns, operators, indextypes and materialized views.

I think you need to explain what, exactly, you're trying to achieve - your one and 2 line drip feed explanations are only confusing things.
Re: View Related Help [message #398073 is a reply to message #398070] Wed, 15 April 2009 02:49 Go to previous messageGo to next message
Michel Cadot
Messages: 64145
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
You can't create Comments on view columns

This is not true:
SQL> create view v as select account from t;

View created.

SQL> comment on table v is 'This is my view';

Comment created.

SQL> comment on column v.account is 'This is the column of my view';

Comment created.

Regards
Michel
Re: View Related Help [message #398085 is a reply to message #398073] Wed, 15 April 2009 03:15 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
So you can - I forgot the 'TABLE' keyword when I tested it.
Re: View Related Help [message #398103 is a reply to message #398085] Wed, 15 April 2009 04:33 Go to previous messageGo to next message
sr_orcl
Messages: 82
Registered: January 2009
Location: mumbai
Member

You are right.but my question is

v.account column in the view is changed into "Account_id."

Then How to apply the comment on that view from the base table.
Re: View Related Help [message #398139 is a reply to message #398103] Wed, 15 April 2009 06:04 Go to previous message
Michel Cadot
Messages: 64145
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And the answer was and is: you have to analyze the text of the view by yourself.

Regards
Michel
Previous Topic: Can we make it in a single query?
Next Topic: to_number-ora - 01722: invalid number
Goto Forum:
  


Current Time: Fri Dec 09 11:55:14 CST 2016

Total time taken to generate the page: 0.06309 seconds