Peter DeBetta's blog about programming in SQL Server 2008, 2005, etc. using technologies such as T-SQL, .NET, CLR, C#, VB, Visual Studio, and SQL Server Management Studio.
Browse by Tags
All Tags »
T-SQL (RSS)
-
Dan Jones wrote a great post about Facets from the new Policy-Based Management feature of SQL Server 2008. At one point in the post, he listed all of the available facets and their supported evaluation modes. Since SQL Server 2008 is not RTM, and since Read More...
|
-
Earlier today, Will Sullivan posted a blog entry, My Statement on Stored Procedures , in which he emphatically states his official opinion of stored procedures as: "I prefer not to use them." He then goes about dismissing most of the misinformation about Read More...
|
-
One last post before I go on vacation next week... SQL Server 2005 includes an undocumented function, sys.fn_varbintohexstr, that converts a hex value to a string representation of that hex value (0x3a becomes '0x3a'), but there is no function to go back Read More...
|
-
While I'm at it, here is the counterpart to the UrlEncode function – UrlDecode: CREATE FUNCTION dbo . UrlDecode ( @url varchar ( 3072 )) RETURNS varchar ( 3072 ) AS BEGIN DECLARE @count int , @c char ( 1 ), @cenc char ( 2 ), @i int , @urlReturn varchar Read More...
|
-
I was perusing the newsgroups when I came across a request in the microsoft.public.sqlserver.clr newsgroup to see if there was a way to use System.Web.HttpUtility.UrlEncode in T-SQL. I know using the CLR is an option, but I decided to write a T-SQL equivalent. Read More...
|
-
So I was doing some research on which is the best way to pass multiple-valued parameters into a stored procedure or user-defined function when I found some interesting results. I had always used a string-based user-defined function to parse a delimited Read More...
|
-
I was going to comment on Adam's post " Medians, ROW_NUMBERs, and performance " (which was a follow-up to Aaron's post " Take the high road to middle ground ") and I realized that I needed to show some code and alas, comments are not so nice about formatting Read More...
|
-
This is a follow-up to a posting from several months ago ( Using XML Data Type Methods to query SSIS Packages ). I included a temp table (based on information I found in the Microsoft.SqlServer.Dts.Runtime.VarTypeConvert class's constructor) which gives Read More...
|
-
So I was trying to figure out a way to get my iTunes/iPod music library into SQL Server. Unfortunately, the XML in the library is not the easiest with which to work. Here is an abridged version of that XML: < plist version = " 1.0 " > < dict Read More...
|