Home > Archive > SQL Anywhere database > May 2005 > SQL statement to enumerate all tables in a db and insert/modify data









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SQL statement to enumerate all tables in a db and insert/modify data
AM

2005-05-25, 8:23 pm

I need to create a sql statement to enumerate all tables in
a database and then copy data from a proxy table to the
standard table.

For the enumeration I thought about reading the
sys.systables but don't know how to distinguish between
system and user tables.

I would really appreciate any assistance.
Glenn Paulley

2005-05-26, 3:23 am

AM wrote in news:4294e534.77b4.1681692777@sybase.com:

> I need to create a sql statement to enumerate all tables in
> a database and then copy data from a proxy table to the
> standard table.
>
> For the enumeration I thought about reading the
> sys.systables but don't know how to distinguish between
> system and user tables.
>
> I would really appreciate any assistance.
>


Any table or view in SYSTABLE owned by SYS or DBO is a system table/view,
that is, their owner is either SYS or DBO. Otherwise the tables in
SYSTABLE are user tables.

--
Glenn Paulley
Research and Development Manager, Query Processing
iAnywhere Solutions Engineering

EBF's and Patches: http://downloads.sybase.com
choose SQL Anywhere Studio >> change 'time frame' to all

To Submit Bug Reports: http://casexpress.sybase.com/cx/cx.stm

SQL Anywhere Studio Supported Platforms and Support Status
http://my.sybase.com/detail?id=1002288
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com