I wrote it. Basically, I don't like the way sp_columns shows data as wide
as it does, and I don't like using a grid for display. So, I wrote sp_DESC
that simulated the Oracle "DESC tableName" that uses the system tables to ge
thte information. I opted to use the system tables instead of the
INFORMATION_SCHEMA views because there is some data I wanted to show that
isn't in the provided view.
I have a handful of procedures I wrote that help me out in certain tasks.
sp_FIND_IN_STORED_PROCEDURE searches the current database for text in the
user stored procedures.
sp_FIND_COLUMN searches the current database for columns. This is handy
when you have many columns duplicated across tables and you want to ensure
they are designed the same.
I also wrote a quick VB app that gets the schema from an Access database and
outputs a file that you can run in Oracle to create duplicate tables. It is
not exact (Rick Shaner has used it and modified it a bit too) because the
datatype do not normally convert directly.
David L. Penton, MCP
Consultant
"Mathematics is music for the mind, and Music is Mathematics for the
Soul. - J.S. Bach"
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
-----Original Message-----
From: Billy Cravens
Also sp_help tablename (SQL Server) does the same thing, though it's
probably overkill.
Also, Dave, when you presented last month, I saw you use a nifty little
stored procedure that seemed to show a lot of info for the database you
were using.. Sp_describe or something like that. Is that something
canned in SQL Server, or something that you wrote?
---
Billy Cravens
HR Systems, Sabre
[EMAIL PROTECTED]
-----Original Message-----
From: David L. Penton
In Oracle use:
DESC tableName
In SQL Server use:
sp_columns tableName
In Access, either Design the table or write something in VB/VBA using
ADO to get the metadata associated with the table.
David L. Penton, MCP
Consultant
"Mathematics is music for the mind, and Music is Mathematics for the
Soul. - J.S. Bach" [EMAIL PROTECTED]
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Gregory Price
Does anyone know a good way to get the details of a table, like a list
of the table columns and their maxlengths and datatypes? I would like
to do this based on the table's title and nothing more...
Any help would be appreciated...
Thanks
Greg Price
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org