Skip to content

Commit

Permalink
Bug 2693317 - Corrected the query to resolve variant field errors
Browse files Browse the repository at this point in the history
  • Loading branch information
johncurrier committed Aug 17, 2010
1 parent b962127 commit e20f85b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
7 changes: 6 additions & 1 deletion dist/releaseNotes.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ <h3><a href='http://schemaspy.sourceforge.net'>SchemaSpy</a> Release Notes</h3>

<li class='release'>x.x.x - xx/xx/xxxx - Subversion revision xxx
<ul>
<li>Resolved <a href="https://sourceforge.net/tracker/?func=detail&aid=2693317&group_id=137197&atid=737989">
bug 2693317</a> - SQL Server 2005 query bug<br>
Corrected the query to resolve variant field errors. rev 593.<br>
Thanks to Erik Putrycz for providing the fix.
</li>
<li>Resolved <a href="https://sourceforge.net/tracker/?func=detail&aid=2815629&group_id=137197&atid=737988">
bug 2815629</a> - Case sensitive MS SQL INFORMATION_SCHEMA.TABLES<br>
Corrected the query of MS SQL table details so that it works with databases
that have case sensitivity enabled.<br>
that have case sensitivity enabled. rev 592.<br>
Thanks to sadas for reporting the issue.
</li>
</ul>
Expand Down
9 changes: 7 additions & 2 deletions src/net/sourceforge/schemaspy/dbTypes/mssql05.properties
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,10 @@ WHERE s.class = 1 AND s.name = 'MS_Description'

# reference: http://databases.aspfaq.com/schema-tutorials/schema-how-do-i-show-the-description-property-of-a-column.html
# return table_name, column_name, comments for a specific :schema
# SQL provided by Ernest Zapata
selectColumnCommentsSql=SELECT OBJECT_NAME(c.object_id) AS TABLE_NAME, c.name AS COLUMN_NAME, ex.value AS comments FROM sys.columns c LEFT OUTER JOIN sys.extended_properties ex ON ex.major_id = c.object_id AND ex.minor_id = c.column_id AND ex.name = 'MS_Description' WHERE OBJECTPROPERTY(c.object_id, 'IsMsShipped')=0 ORDER BY OBJECT_NAME(c.object_id), c.column_id
# SQL provided by Ernest Zapata & Erik Putrycz
selectColumnCommentsSql=SELECT OBJECT_NAME(c.object_id) AS TABLE_NAME, c.name AS COLUMN_NAME, CONVERT(varchar(100), ex.value) AS comments \
FROM sys.columns c \
LEFT OUTER JOIN sys.extended_properties ex \
ON ex.major_id = c.object_id AND ex.minor_id = c.column_id AND ex.name = 'MS_Description' \
WHERE OBJECTPROPERTY(c.object_id, 'IsMsShipped')=0 \
ORDER BY OBJECT_NAME(c.object_id), c.column_id

0 comments on commit e20f85b

Please sign in to comment.