Find view's definition in DB2.

RDBMS from IBM and IBM's Hierarchical DBMS and Transaction Manager (IMS DC).
Post Reply
LearnMainframe
Registered Member
Posts: 26
Joined: Fri Jul 05, 2013 11:52 am

Find view's definition in DB2.

Post by LearnMainframe »

Hi,

Does someone know of a possible way to find the definition of a view? I did check in the sysibm.sysviews table and there I was not able to get a meaningful definition.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Find view's definition in DB2.

Post by nicc »

Find the program/SELECT that creates the view.
Regards
Nic
User avatar
Akatsukami
Global Moderator
Global Moderator
Posts: 122
Joined: Tue Oct 20, 2015 3:20 am
Location: Bloomington, IL
Contact:

Re: Find view's definition in DB2.

Post by Akatsukami »

What information are you seeking?
"I come to the conclusion that, men loving according to their own will and fearing according to that of the prince, a wise prince should establish himself on that which is in his own control and not in that of others." -- Niccolò Machiavelli
LearnMainframe
Registered Member
Posts: 26
Joined: Fri Jul 05, 2013 11:52 am

Re: Find view's definition in DB2.

Post by LearnMainframe »

I need to know the DDL for the view and the description of the columns used in the view definition.
LearnMainframe
Registered Member
Posts: 26
Joined: Fri Jul 05, 2013 11:52 am

Re: Find view's definition in DB2.

Post by LearnMainframe »

This SQL query has worked for me:

Code: Select all

SELECT * FROM SYSIBM.SYSVIEWS 
WHERE NAME LIKE '%Z4_UID%' 
AND     CREATOR = 'CAPN'
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM DB2 and IMS DB/DC”