Cameron Snapp

Jan 19 2011

DBMI Tech Tip: Writing a Good SQL Story - The Importance of Table Join Order

Writing SQL queries is as much about getting the right results as writing a query that’s readable, performs well, and is easy to test.

Read More

Tagged: DMBI, SQL

Jun 09 2010

Text Search in SQL Server Stored Procedures: Overcoming sys.comments Insufficiencies

Searching a SQL Server database’s sys.comments table has long been a quick way to find stored procedure usage of another database, table, or column.  Likewise, clicking “view dependencies” on a table is a quick way to find the opposite: which stored procedures (on the local db) refer to that table.  I recently came across a scenario where neither met my needs, so I had to expand the capabilities of the former.  The limitation of the first approach is parsing the text field to find multiple items.  CHARINDEX and SUBSTRING functions only get you to the first, and looping can be incorrect as line breaks may occur haphazardly mid-text. 

Read More

 

Disclaimer

The words and opinions expressed here are those of each article's respective author, and do not necessarily represent the views of CapTech Ventures.