"Masroor Kazmi" <mkazmi (AT) deloitte (DOT) co.uk> wrote
Quote:
Hi Folks
A simple question
How do I find out in which tables contain a particular datatype in a
database.
i.e I want to find out (maybe even list the column name) all the
tables in a database that holds a float datatype.
I believe there should be some table I can use in the master
database
but I am not sure off hand which ones they are.
Thanks for your help,
Mas |
Go to www.sypron.nl/new_ssp.html and download the stored procs from
this page and install these into your ASE server.
Then run the following command:
sp_rv_findobject 'coltype=float%'
go
This will display all columns (and storedproc parameters) with a
'float' datatype in all database in your server. Since this will
include a bunch of columns from system tables in each database, you
can exclude those as follows:
sp_rv_findobject 'coltype=float%', 'type!=S'
go
To list all columns/parameters, including their datatypes, run:
sp_rv_findobject 'coltype=%'
go
Further filtering options exist for this stored proc; see the web page
mentioned above.
HTH,
Rob
-------------------------------------------------------------
Rob Verschoor
Certified Sybase Professional DBA for ASE 12.5/12.0/11.5/11.0
and Replication Server 12.5
Author of "Tips, Tricks & Recipes for Sybase ASE" and
"The Complete Sybase ASE Quick Reference Guide"
Online orders accepted at http://www.sypron.nl/shop
mailto:rob (AT) YOUR (DOT) SPAM.sypron.nl.NOT.FOR.ME
http://www.sypron.nl
Sypron B.V., P.O.Box 10695, 2501HR Den Haag, The Netherlands
-------------------------------------------------------------