My Work
My Blogs
Hotlinks
Category Archives: database
Use SQL to insert a label in front of a DataBound list
Here’s a clever little solution I would like to add to the book of ‘get it done’. While this particular example uses ASP.NET controls, this concept really applies to any language that supports DataBinding to a control. The base concept … Continue reading
What if you want to PIVOT against a text column?
If you’ve ever worked with or researched SQL Server’s PIVOT function, you probably noticed most of the samples pivot against an id column. Typically an int column like EmployeeID, or StoreID. That’s fine and dandy, but what happens when you … Continue reading
Posted in database, microsoft, SQL, tips and tricks, tsql
Tagged coalesce, dynamic sql, exec, pivot, quotename, SQLSERVER, table variable, tsql
2 Comments
Incorrect syntax near the keyword ‘table’ in TSQL
Ran into something little that I know I’m going to forget if I don’t write down. It appears that when using a TABLE variable in tsql ( SQL Server 2005 ), you must DECLARE that variable on it’s own line, … Continue reading
Posted in database, microsoft, SQL, tsql
Tagged #table, DECLARE, SQLSERVER, SQLSERVER 2005, table variable, tsql
4 Comments
How to TWEET from a SQL CLR Stored Procedure
Here’s another SQL Server 2005 geek out moment, a CLR SPROC that tweets to Twitter. Big shoutout to Danny Battison for sharing the C# code to post to Twitter. This is what got me started on the C# side of … Continue reading
Posted in .net, C#, database, microsoft, SQL, tips and tricks, tsql, twitter
Tagged .net, .net assembly, .net Common Language Runtime, C#, CLR, CLR SPROC, sproc, sql server 2005, stored procedure, tweet, twitter
12 Comments
