Show Changes Show Changes
Edit Edit
Print Print
Recent Changes Recent Changes
Subscriptions Subscriptions
Lost and Found Lost and Found
Find References Find References
Rename Rename
Administration Page Administration Page
Search

History

10/14/2005 7:46:30 AM
-208.178.192.31
10/14/2005 7:34:12 AM
-208.178.192.31
10/14/2005 7:32:20 AM
-208.178.192.31
10/14/2005 7:30:25 AM
-208.178.192.31
10/14/2005 7:27:45 AM
-208.178.192.31
List all versions List all versions

RSS feed for the FlexWiki namespace

Sql To Generate Table List Wiki
.
 --Andrew D. Smith
 declare @tbname varchar(200)
 select @tbname = 'pd_grc_bgt'


 drop table #toWiki
 select convert(varchar(255),'||{T^!C4TW80^}Tables in Database||') as txt, -2 as odr  into #toWiki


 insert into #toWiki VALUES('||{!}Table Name||{!} ||{!} ||{!}Description||',-1)


 insert into #toWiki 
 select '||[' + TABLE_NAME + ']||' + CASE TABLE_TYPE
         WHEN 'BASE TABLE' THEN '(*)||[Table'
         ELSE '(i)||[View'
      END + ']||||', 2 from information_schema.tables t
 WHERE T.TABLE_NAME NOT LIKE 'sys%'
 AND T.TABLE_NAME <> 'dtproperties'
 AND T.TABLE_SCHEMA <> 'INFORMATION_SCHEMA'


 insert into #toWiki VALUES('',5)
 insert into #toWiki VALUES('SqlToGenerateTableListWiki',6)


 select txt from #toWiki order by odr

Example

Tables in Database
Table Name Description
Inventory View
Pub Table
See

:SQLDictionary:

Original Contribution by AndrewDSmith

Not logged in. Log in

Welcome to the home of FlexWiki, a collaboration tool, based on WikiWiki, implemented using Microsoft .NET technologies

This is FlexWiki, an open source wiki engine.

This site supports the new NoFollow anti-spam initiative.
Change Style

Recent Topics