About Jeremiah

I'm a senior database administrator with Cass Information Systems, a SQL Server MVP, director-at-large with PASS, and I also help out with my local chapter and the Application Development virtual chapter.

You can learn more about me or contact me directly.

Links for the Week of 2009.06.12

SQL Server
Denis Gobo provides a double dose of dynamic SQL hotness via Changing exec to sp_executesql doesn’t provide any benefit if you are not using parameters correctly and Avoid Conversions In Execution Plans By Using sp_executesql Instead of Exec. Following his tips in here will net you some considerable benefits in how your dynamic SQL [...]

Converting Measurements with T-SQL

I frequently find myself having to perform calculations on the source data based on a range of user supplied values. Usually there will be some kind of target and destination parameter supplied. So, for example, the users will want to see total sales in terms of burgers sold or something like that. Here’s where it [...]

Dynamic T-SQL Resources

As a follow up to my Dynamic T-SQL presentation, a list of Dynamic T-SQL resources have been posted on the AppDev SIG page of PASS site. Hit up the link for more info.
When I first started writing dynamic SQL, I had a hard time finding any resources on the topic. If you have any that [...]

Fun with PATINDEX() and DB_NAME()

I’m going to guess everyone can guess that DB_NAME() will give you the name of the current database when called with no parameters. If not, now you know.
PATINDEX() is a little bit more fun, so before we get into things, here’s how PATINDEX() works:

DECLARE @my_var AS NVARCHAR(30);
SET @my_var = ‘fun with patterns’;

SELECT PATINDEX(‘%pattern%’, @my_var);
– returns [...]

Dynamic SQL Presentation Materials

First off, thanks to everyone who attended today’s Dynamic SQL presentation. I appreciate everyone taking the time out of their busy day to attend the first AppDev SIG Live Meeting in quite some time. Hopefully there will be many more.
I’ve attached a copy of the Dynamic SQL presentation that I gave today. Here’s a run [...]