View previous topic :: View next topic
|
Author |
Message |
esrraju
New User
Joined: 19 Feb 2007 Posts: 9 Location: India
|
|
|
|
how to find the base table of an ALIAS ? |
|
Back to top |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
Please try this out
SELECT NAME,TBNAME FROM SYSIBM.SYSTABLES WHERE NAME='Alias name' AND TYPE=’A’; |
|
Back to top |
|
|
esrraju
New User
Joined: 19 Feb 2007 Posts: 9 Location: India
|
|
|
|
Thanks for your response.
This query will give you the Alias name itself, but I want to know that base table on which this Alias is built. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Try SYSCAT.TABLES. |
|
Back to top |
|
|
esrraju
New User
Joined: 19 Feb 2007 Posts: 9 Location: India
|
|
|
|
When I try this query select * from SYSCAT.TABLES ..It says SYSCAT.TABLES could not be found. Please ADVISE. |
|
Back to top |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
Murali...I too read somewhere that we can use SYSCAT.TABLES for that. But I tried to do a select on this table and ended up with SQLCODE = -204, ERROR: SYSCAT.TABLES IS AN UNDEFINED NAME.
Raju, Generating the DDL for the alias, will give the Create statement of that alias from which we can check the base table name..I am just trying to check for such a JCL. Will let you know, in case I find it. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
what about looking at " SYSIBM.SYSALIASES" |
|
Back to top |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
there is no such table, I beleive. I tried it out only to get another -204. |
|
Back to top |
|
|
|