Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
How to find the perticular view has been defined

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
Author Message
umed

New User


Joined: 13 May 2005
Posts: 40

PostPosted: Thu Dec 22, 2005 12:18 am    Post subject: How to find the perticular view has been defined
Reply with quote

Hi,

How can we find the tables on which a perticular view has been defined.Here we are having only name of that view with us.

Regards,
Umed
Back to top
View user's profile Send private message
References
DavidatK

Senior Member


Joined: 22 Nov 2005
Posts: 715
Location: Troy, Michigan USA

PostPosted: Thu Dec 22, 2005 3:23 am    Post subject:
Reply with quote

If you have DB2 FileAid. use option 3.4, then option GD to display the view.
Back to top
View user's profile Send private message
senthilssg

Active User


Joined: 09 Dec 2005
Posts: 55

PostPosted: Thu Dec 22, 2005 11:52 am    Post subject:
Reply with quote

Hi umed,

you can get the table name by getting informattion from the sysibm.sysviews catalog table.


execute the query in the following format in QMF or in SPUFI

SELECT NAME ,TEXT FROM SYSIBM.SYSVIEWS WHERE NAME ='view name '


In output of above query , TEXT column having declaration of that view . from that you can know corresponding table for that given view


Eg:


NAME TEXT
------------------ ---------------------------------------------
EMPLOYEE_VIEW create view employee_view (id ,name, sal) as select emp_id , emp_name,emp_sal from ssgsen.employee;

In that example , table name for the view EMPLOYEE_VIEW is ssgsen .employee;
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1