SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Converting identifiers into SQL Server table variables in Management Studio

If I had a nickel for every time someone gave me a list of identifiers and asked me to pull a result set for them I would be a very wealthy man. Over the years this is an endless request. I used to use several different tools like excel for example to convert the list of identifiers into SQL Statements. I would then use set based logic to complete my task inside SQL Server.

Being a SQL Server Database Administrator I like to use one consistent tool for working with queries. One day I noticed an interesting feature inside of the search and replace functionality inside Management Studio. I could utilize regular expression as a tool in my tool belt for manipulating text inside of SQL Server Management Studio. This gave me the functionality to stay within my preferred tool for doing SQL Server development work.

If you want to see how you can quickly manipulate the identifiers and convert them into table variable check out the three minute video below.

The post Converting identifiers into SQL Server table variables in Management Studio appeared first on JohnSterrett.com SQL Server Consulting.

John Sterrett

John Sterrett is very active within the SQL Server community. He is a PASS Regional Mentor for the South Central Region, co-founded the West Virginia SQL Server User Group and hosted two PASS SQL Saturday events in West Virginia. John has presented at several SQL Server events including PASS SQLRally, PASS Member Summit, many PASS SQL Saturday events, code camps, and, user groups. John is a syndicated blogger at http://johnsterrett.com.

Comments

Leave a comment on the original post [johnsterrett.com, opens in a new window]

Loading comments...