How to get only the user table names from systables
Posted in 2003
Topics: Server Administration, Migration, Import/Export & Data Conversion
Hi,
I am planning to write a shell script that will unload all user
tables from a database, but for this I require to get all the
usertable names, now the problem is that the systables lists system
tables also. On the other hand if you go to dbaccess where the table
info is listed, you will have only user tables listed. I want to know
how dbaccess works out this "magic" of distinguishing system tables
and usertables.
Thankx
joe
Hi,
the following statement should do it:
SELECT * FROM systables WHERE tabid > 100
joseph v d'silva wrote:
> Hi,
>
> I am planning to write a shell script that will unload all user
> tables from a database, but for this I require to get all the
> usertable names, now the problem is that the systables lists system
> tables also. On the other hand if you go to dbaccess where the table
> info is listed, you will have only user tables listed. I want to know
> how dbaccess works out this "magic" of distinguishing system tables
> and usertables.
>
> Thankx
>
> joe
In message <3F44870D.7040609@no-domain-no-spam.com>, Corne' Cornelius
<corne@no-domain-no-spam.com> writes
>Hi,
>
>the following statement should do it:
>
>SELECT * FROM systables WHERE tabid > 100
tabid >= 100
>
>
>
>joseph v d'silva wrote:
>> Hi,
>> I am planning to write a shell script that will unload all user
>> tables from a database, but for this I require to get all the
>> usertable names, now the problem is that the systables lists system
>> tables also. On the other hand if you go to dbaccess where the table
>> info is listed, you will have only user tables listed. I want to know
>> how dbaccess works out this "magic" of distinguishing system tables
>> and usertables.
>> Thankx
>> joe
>
--
Andrew Lennard andy@kontron.demon.co.uk