Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / February 2006

Tip: Looking for answers? Try searching our database.

how to find the base table of  an ALIAS ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bikkaran@in.ibm.com - 15 Feb 2006 11:56 GMT
how to find the base table of  an ALIAS ?

thanks
Serge Rielau - 15 Feb 2006 12:29 GMT
> how to find the base table of  an ALIAS ?
>
> thanks

VALUES (TABLE_SCHEMA('MYSCHEMA', 'MYALIAS'),
        TABLE_NAME('MYSCHEMA', 'MYALIAS'))

You can also use recursive SQL over SYSCAT.TABLES of course.
Cheers
Serge
Signature

Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

bikkaran@in.ibm.com - 15 Feb 2006 13:35 GMT
Hi ,

Thanks a lot ...I used syscat.tables where in base_tabschema,
base_tabname  gave the desired result.

Regards
bikash
Serge Rielau - 15 Feb 2006 14:06 GMT
> Hi ,
>
> Thanks a lot ...I used syscat.tables where in base_tabschema,
> base_tabname  gave the desired result.
That works as long as you don't have alias on alias.
That's where recursion comes in.

Cheers
Serge

Signature

Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.