Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Query to look for child tables of parent table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
manya jyoti

New User


Joined: 30 Mar 2009
Posts: 1
Location: Delhi

PostPosted: Mon Mar 30, 2009 5:00 pm    Post subject: Query to look for child tables of parent table
Reply with quote

Hi! This is your First post in our Forums! So please be sure to 1) Use meaningful and descriptive Topic Title 2) Try to post your query in the relevant forum category 3) Make sure your query is not already posted and solved in our forums, Use the Search facility and avoid Reposts! If you are following the above rules, delete this message and post your query here!
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Mar 30, 2009 9:33 pm    Post subject:
Reply with quote

Hello and welcome to the forum,

What does "child table" mean to you (unfortunately, the term means different things to diffeent people/organizations).

Suggest you talk with your dba to get the info you want from your environment.
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 186
Location: chennai

PostPosted: Wed Apr 01, 2009 12:44 am    Post subject: Reply to: Query to look for child tables of parent table
Reply with quote

Hi

This post is seems to be funny.
Who is posting. What is the post. Is the requester is satisfied with the replay?

Raghu
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Apr 01, 2009 12:58 am    Post subject:
Reply with quote

Hello,

Quote:
This post is seems to be funny.
I believe not. . .

Quote:
Who is posting. What is the post.
Suggest your time would be better spent doing something other than this post. . .

It was the first post for Manya. The question is the topic subject.

Maybe Manya will post some follow up info and we'll know if there are more questions or if it is resolved.
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 186
Location: chennai

PostPosted: Thu Apr 02, 2009 12:28 am    Post subject: Reply to: Query to look for child tables of parent table
Reply with quote

Hi Dick

See the post of Manya
Hi! This is your First post in our Forums! So please be sure to 1) Use meaningful and descriptive Topic Title 2) and it continues
Form this I post I understood that Manya- the person who wrote the post- is saying.... Hi This is your First post in our Forums! ...
What can a person who read the post will understand?
The post comes under the name manya joyti. Normally a normal person can see something wrong this. That is what I feel and expressed. If it hurts any body, sorry and I hereby withdraw my words.
And don't say what I have to do

Thanks
Raphe
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 02, 2009 12:38 am    Post subject:
Reply with quote

Raphe,

Quote:
And don't say what I have to do


Dick only made a suggestion; he did not tell you what to do.

I would suggest not being so sensitive and learn more english so that in the future your posts are not miss-interpreted.
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 186
Location: chennai

PostPosted: Thu Apr 02, 2009 10:43 pm    Post subject:
Reply with quote

Hi Dick

This is not the forum for this type of argument.
You being a senior member in this forum we expect something productive from you.

Regards
Raghu
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Thu Apr 02, 2009 10:46 pm    Post subject:
Reply with quote

[sarcasm on]
Yes, Dick; how about being more productive?
[/sarcasm off]
icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Thu Apr 02, 2009 11:10 pm    Post subject: Reply to: Query to look for child tables of parent table
Reply with quote

given also the high salary, and the fringe benefits icon_biggrin.gif icon_biggrin.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Apr 03, 2009 3:26 pm    Post subject: Re: Reply to: Query to look for child tables of parent table
Reply with quote

Hi Raghu,
Raghu navaikulam wrote:
See the post of Manya
Hi! This is your First post in our Forums! So please be sure to 1) Use meaningful and descriptive Topic Title 2) and it continues
When a "new user" posts his/her very first post on this forum these lines (bold ones) are automatically "inserted" - one is supposed to remove them & post the supporting explanation about the "actual question" . . .
Back to top
View user's profile Send private message
mtaylor

Active User


Joined: 20 Feb 2009
Posts: 108
Location: Kansas City

PostPosted: Sun Apr 05, 2009 8:44 pm    Post subject:
Reply with quote

I did this one time; Do a query on SYSIBM.TABLES and join on FORIEGN_KEY relationships or something. It's been a few years.
Back to top
View user's profile Send private message
mtaylor

Active User


Joined: 20 Feb 2009
Posts: 108
Location: Kansas City

PostPosted: Sun Apr 05, 2009 8:45 pm    Post subject:
Reply with quote

mtaylor wrote:
I did this one time; Do a query on SYSIBM.TABLES and join on FORIEGN_KEY relationships or something. It's been a few years.


Oh and this is only good for Schema RI, won't tell you anything about Application enforced RI of which there is often quiet a lot.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Mon Apr 06, 2009 7:06 pm    Post subject:
Reply with quote

Jyothi,

This is what you are looking for
Code:
 SELECT  A.REFTBNAME             
      , A.REFTBCREATOR           
      , A.CREATOR               
      , A.TBNAME                 
      , A.RELNAME               
  FROM  SYSIBM.SYSRELS A         
  WHERE A.REFTBNAME = 'INET_CASE'
  ORDER BY A.REFTBNAME           
      , A.REFTBCREATOR           
      , A.RELNAME               
;   



Thank You,
Sushanth Bobby
Back to top
View user's profile Send private message
ashishsr123

New User


Joined: 06 May 2008
Posts: 33
Location: Chennai

PostPosted: Sun Apr 26, 2009 4:07 pm    Post subject:
Reply with quote

Hi, Jyothi,

If you have DB2 catalog manager at your shop , finding parent table ,will be a Child's play icon_smile.gif .

If you have it ,do let me know i will give you screenshots of it to help you find out.

Regards,
Ashish
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Apr 27, 2009 2:10 am    Post subject:
Reply with quote

Hello,

Quote:
If you have DB2 catalog manager at your shop , finding parent table ,will be a Child's play
Not necessarily. . . .

If it is an older system, very likely not child's play - it may not even be do-able looking only at the database definition. . .

Please look at this topic:
http://ibmmainframes.com/viewtopic.php?t=40025
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts SQL Query optimization. arunsoods DB2 12 Sun Sep 04, 2016 6:27 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us