March 23, 2009 at 12:30 am
Comments posted to this topic are about the item Super Quick Table Meta Data
March 23, 2009 at 2:00 am
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.
March 23, 2009 at 2:47 am
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
March 23, 2009 at 3:19 am
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.
March 23, 2009 at 3:30 am
I generally highlight on the Table and Press Alt + F1 (shortcut for sp_help) which gives me all the table details..
March 23, 2009 at 4:59 am
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.
March 23, 2009 at 6:55 am
it be nice if the code actually works. I get the same errors.
March 23, 2009 at 6:57 am
March 23, 2009 at 7:18 am
Keyboard customization is Very cool!
March 23, 2009 at 7:34 am
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
March 23, 2009 at 7:48 am
Thanx, SSCertifiable Squared, for converting it to be SQL 2K5 friendly.
Yes, I used some features such as the variable initialization that are features of 2K8, as that is all that I'm using these days.
I'll comment on the other points such as sp_help later.
Thanx much.
March 23, 2009 at 8:19 am
Hey GSquared, thanks for that post. - Haven't moved to '08 yet.
March 23, 2009 at 8:23 am
You know a feature that would be neat to add, if you left the table empty or put in a %, and then typed in a column name... Then return all of the tables that hold that specific column name.
Just thinking out loud. 😀
March 23, 2009 at 8:33 am
I had the same issue with SQl Server 2005. Could not buikd the sp.
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".
March 23, 2009 at 8:38 am
Please see the above attached 2005 friendly script...
Viewing 15 posts - 1 through 15 (of 37 total)
You must be logged in to reply to this topic. Login to reply