|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, May 01, 2013 3:46 PM
Points: 7,
Visits: 69
|
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Sunday, April 14, 2013 8:55 AM
Points: 1,383,
Visits: 1,212
|
|
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.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, April 23, 2013 7:32 AM
Points: 6,
Visits: 41
|
|
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
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, May 09, 2013 10:33 AM
Points: 1,
Visits: 110
|
|
| 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.
|
|
|
|
|
SSC 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..
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Thursday, June 14, 2012 11:40 PM
Points: 115,
Visits: 299
|
|
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.
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Tuesday, March 12, 2013 1:26 PM
Points: 86,
Visits: 473
|
|
| it be nice if the code actually works. I get the same errors.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: 2 days ago @ 7:07 AM
Points: 162,
Visits: 109
|
|
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.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, June 20, 2012 11:00 AM
Points: 21,
Visits: 70
|
|
| Keyboard customization is Very cool!
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: Monday, May 06, 2013 1:09 PM
Points: 15,439,
Visits: 9,569
|
|
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
|
|
|
|