dbTalk Databases Forums  

Finding out which tables contain a float datatype in a database

comp.databases.sybase comp.databases.sybase


Discuss Finding out which tables contain a float datatype in a database in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Masroor Kazmi
 
Posts: n/a

Default Finding out which tables contain a float datatype in a database - 01-07-2004 , 10:37 AM






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

PS HAPPY NEW YEAR :-)

Reply With Quote
  #2  
Old   
Rob Verschoor
 
Posts: n/a

Default Re: Finding out which tables contain a float datatype in a database - 01-07-2004 , 11:04 AM






"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
-------------------------------------------------------------



Reply With Quote
  #3  
Old   
Ed Avis
 
Posts: n/a

Default Re: Finding out which tables contain a float datatype in a database - 01-07-2004 , 02:30 PM



mkazmi (AT) deloitte (DOT) co.uk (Masroor Kazmi) writes:

Quote:
i.e I want to find out (maybe even list the column name) all the
tables in a database that holds a float datatype.
Look at sysobjects, syscolumns and systypes. When joining syscolumns
to systypes I think you have to use 'usertype' not 'type' in the
latter table, I'm not certain.

Quote:
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.
Not in the master database, in the database you want to examine.

--
Ed Avis <ed (AT) membled (DOT) com>


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.