Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 1234»»»

Super Quick Table Meta Data Expand / Collapse
Author
Message
Posted Monday, March 23, 2009 12:30 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, March 31, 2014 3:33 PM
Points: 7, Visits: 74
Comments posted to this topic are about the item Super Quick Table Meta Data
Post #681240
Posted Monday, March 23, 2009 2:00 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, September 15, 2014 11:45 PM
Points: 1,385, Visits: 1,245
Interesting article, it would probably benefit from at least a passing mention of the built-in stored procedure sp_help, mentioning how the custom procedure is better or more appropriate for a given situation.



http://poorsql.com for T-SQL formatting: free as in speech, free as in beer, free to run in SSMS or on your version control server - free however you want it.
Post #681259
Posted Monday, March 23, 2009 2:47 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 11:24 PM
Points: 6, Visits: 49
Hello
I could use this metadata schema, but I could not get it to work in 2005 version.

I got some errors when running the script:
Msg 139, Level 15, State 1, Procedure TableInfo, Line 0
Cannot assign a default value to a local variable.
Msg 139, Level 15, State 1, Procedure TableInfo, Line 0
Cannot assign a default value to a local variable.
Msg 137, Level 15, State 2, Procedure TableInfo, Line 17
Must declare the scalar variable "@DBName".
Msg 137, Level 15, State 2, Procedure TableInfo, Line 20
Must declare the scalar variable "@DBName".
Msg 139, Level 15, State 1, Procedure TableInfo, Line 0
Cannot assign a default value to a local variable.
Msg 139, Level 15, State 1, Procedure TableInfo, Line 0
Cannot assign a default value to a local variable.
Msg 137, Level 15, State 2, Procedure TableInfo, Line 65
Must declare the scalar variable "@TableSchema".
Msg 102, Level 15, State 1, Procedure TableInfo, Line 86
Incorrect syntax near ','.
Msg 137, Level 15, State 2, Procedure TableInfo, Line 116
Must declare the scalar variable "@TableSchema".
Msg 137, Level 15, State 2, Procedure TableInfo, Line 135
Must declare the scalar variable "@Empty".
Msg 137, Level 15, State 2, Procedure TableInfo, Line 316
Must declare the scalar variable "@TableSchema".
Msg 137, Level 15, State 2, Procedure TableInfo, Line 335
Must declare the scalar variable "@Y".

tballe
Post #681270
Posted Monday, March 23, 2009 3:19 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, August 1, 2014 4:29 AM
Points: 1, Visits: 123
Nice piece of work but, you could also type out the table name, highlight it and press Alt + F1 in SSMS, this will return all schema information for the table including keys, indexes and constraints.
Post #681275
Posted Monday, March 23, 2009 3:30 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, May 11, 2012 5:40 AM
Points: 28, Visits: 149
I generally highlight on the Table and Press Alt + F1 (shortcut for sp_help) which gives me all the table details..
Post #681278
Posted Monday, March 23, 2009 4:59 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, September 11, 2014 6:08 AM
Points: 115, Visits: 313
I've got something similar I wrote that I use. Possibly worth pointing out that you can bind your own stored procedures to keys using "Customise" in SSMS and QA (e.g. Options -> Environment -> Keyboard in SSIS). I guess like the author, I want something that shows the information that I think is more useful to me than alt-F1 / sp_help gives me. For example, my equivalent of alt-F1 gives the corresponding "CREATE TABLE" and "SELECT" statements for the table, which I can then just copy, paste and edit, and shows the metadata descriptions of the fields.

I think the general point though is that you don't have to live with the metadata tools and procedures they give you - there is ample scope to extend them a bit to suit yourself better.
Post #681316
Posted Monday, March 23, 2009 6:55 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, May 5, 2014 8:55 AM
Points: 86, Visits: 478
it be nice if the code actually works. I get the same errors.
Post #681380
Posted Monday, March 23, 2009 6:57 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, July 1, 2014 8:31 AM
Points: 165, Visits: 123
It may be that SQL 2008 allows values to be assigned to local variables in the declaration, but SQL 2005 does not.




Regards,

Carla Hepker
Documentation: A Shaft of light into a coded world.


Post #681382
Posted Monday, March 23, 2009 7:18 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, June 20, 2012 11:00 AM
Points: 21, Visits: 70
Keyboard customization is Very cool!
Post #681406
Posted Monday, March 23, 2009 7:34 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, June 27, 2014 12:43 PM
Points: 13,872, Visits: 9,596
I like the proc. I made a modified version that works in SQL 2005 (since that's what I'm using right now). If anyone else wants to check that out, I've attached it to this post.

- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon


  Post Attachments 
TableInfo2005.txt (122 views, 9.65 KB)
Post #681416
« Prev Topic | Next Topic »

Add to briefcase 1234»»»

Permissions Expand / Collapse