All Forums Database
Shanrice 4 posts Joined 09/06
30 Oct 2006
Looking for View Definition in DBC table

For some reason I am unable to access "teradata adminstrator" to see the view definition.Is there a DBC table to look at the view definition? TIA

RGlass 35 posts Joined 09/04
30 Oct 2006

Just use command -> show view

RGlass 35 posts Joined 09/04
30 Oct 2006

Sorry, that's -> show view databasename.viewname;

Achillies 2 posts Joined 10/06
31 Oct 2006

Hi,Even the below command will give u the definitionSel * from dbc.tables where tablename ' 'xyz' and databasename ' 'abc'This command will give all the attributes of the view (view definition is also one of them).I hope this helps

GogulM 32 posts Joined 08/06
31 Oct 2006

sel CreateTextfrom dbc.tvmwhereTVMName = 'zxcv' -- ur view name by this query u can view the definition..provided u ve access to dbc tables and views.

~Gogul

Shanrice 4 posts Joined 09/06
31 Oct 2006

Thankq..

lgscheurich 27 posts Joined 09/06
22 Mar 2011

What is the difference between requesttext and createtext?

dnoeth 4628 posts Joined 11/04
22 Mar 2011

RequestText is the original source code "as is" including comments:
SHOW SELECT * FROM VIEW

When a view is created then this source code is parsed, object names are resolved and stored in CreateText:
SHOW QUALIFIED SELECT * FROM VIEW

Dieter

Dieter

prashanthmspk 4 posts Joined 04/13
10 Dec 2015

sorry for digging up the old topic..
can somebody please let me know from where is the old view definition (database and columns) is fetched when I execute
SHOW QUALIFIED SEL * FROM VIEW ??
In dbc.tables and dbc.tvm, I can only see the statement used to create the view like 'replace view as lock row for access sel * from table', but when i use qualified I can see all the columns that were there when the view was created..
I'm just curious where the old information is still available..
-Prashanth
 

Prashanth

Srinivas_tera 5 posts Joined 12/11
10 Dec 2015

when  QUALIFIED is used (in this case) ,Teradata replace * with fully qualified actual column names of base table. As a result you are viewing the column names in  view definition .

-S

ToddAWalter 316 posts Joined 10/11
10 Dec 2015

See Dieter's 22 March 2011 note above. .RequestText has what you are looking at.  .CreateText has the complete view definition.

prashanthmspk 4 posts Joined 04/13
15 Dec 2015

thanks much!

Prashanth

You must sign in to leave a comment.