Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

File / table description.
Newby question but can't find it myself.

How can I get a file-description from a file / table ?

eg. the decription must deliver the following info:

Record nr.
Field nr.
Fieldname
Field description
Data type
Lenght
Decimals

etc....

Can somebody please tell me what to do?

Thanx
MF

Report this thread to moderator Post Follow-up to this message
Old Post
MF
08-24-05 02:23 PM


Re: File / table description.
Is this?

Select * from information_schema.columns where  table_name='yourTabl
e'

Madhivanan


Report this thread to moderator Post Follow-up to this message
Old Post
Madhivanan
08-24-05 02:23 PM


Re: File / table description.
Madhivanan  wrote:
> Is this?
>
> Select * from information_schema.columns where  table_name='yourTabl
e'
>
> Madhivanan
>

Doesn't work, but thanx for the response.

Report this thread to moderator Post Follow-up to this message
Old Post
MF
08-24-05 04:24 PM


Re: File / table description.
You'll probably have to combine a few different things to get those
details - check out sysobjects, syscolumns, object_name(),
objectproperty(), columnproperty() and  fn_listextendedprope
rty() in
Books Online. You could also have a look at the source for sp_help,
which returns most of the items you're interested in.

If you can't work out what you're looking for, I suggest you post a
simple CREATE TABLE statement (or perhaps use to a table in the pubs
database as an example), and show what your desired output would look
like for that table - that will probably be clearer than a description.
You might also want to clarify why Madhivanan's suggestion didn't work
for you.

Simon


Report this thread to moderator Post Follow-up to this message
Old Post
Simon Hayes
08-24-05 04:24 PM


Re: File / table description.
Madhivanan  (madhivanan2001@gmai
l.com)  writes:
> Is this?
>
> Select * from information_schema.columns where  table_name='yourTabl
e'

Select * from INFORMATION_SCHEMA.COLUMNS where  TABLE_NAME='yourTabl
e'

This matter with a case-sensitive collation. And the names in
INFORMATION_SCHEMA is all in uppercase.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp


Report this thread to moderator Post Follow-up to this message
Old Post
Erland Sommarskog
08-25-05 01:24 AM


Re: File / table description.
Thanx a lot all of you.  I was looking in the Master db for these files,
combining them will be difficult but I'll give it a try.

TY


Simon Hayes  wrote:
> You'll probably have to combine a few different things to get those
> details - check out sysobjects, syscolumns, object_name(),
> objectproperty(), columnproperty() and  fn_listextendedprope
rty() in
> Books Online. You could also have a look at the source for sp_help,
> which returns most of the items you're interested in.
>
> If you can't work out what you're looking for, I suggest you post a
> simple CREATE TABLE statement (or perhaps use to a table in the pubs
> database as an example), and show what your desired output would look
> like for that table - that will probably be clearer than a description.
> You might also want to clarify why Madhivanan's suggestion didn't work
> for you.
>
> Simon
>


Report this thread to moderator Post Follow-up to this message
Old Post
MF
08-25-05 12:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

Microsoft SQL Server forum archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 11:22 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006