The Lazy Programmer
There once was a lazy programmer who did nothing but sat around reading the newspaper at work. Lazy programmer would listen to audio books, surf the web for amazon deals, and watch youtube videos....
View ArticleFLAT
There are lots of methods to flatten a table. You can cursor at it (loop or use a cte, temp table and build your string), but t-sql is a language of sets and anytime you move away from groups or sets...
View ArticleQuick and dirty: Sql Filestream Object – creating, inserting, displaying
There are a lot of sites on setting up the filestream object in sql (I’ll let you discover that yourself), but I had a hard time finding a good source of information for utilizing it in a web page....
View ArticleError converting data type numeric to decimal
Simple one. So simple, I shouldn’t have spent so much time trying to figure it out. So simple, I should probably quit anything that boasts of ‘information’ and ‘technology’.’ But alas, my pride is...
View ArticlePivot Without Aggregation or Aggravation
I needed to flip my data horizontally. I didn’t need to aggregate anything. I was just working with a user that wanted the data to look different. Instead of this Car Tire Car Window Car Wipers Car...
View ArticleIf you can’t obtain dbschema_tables_info
After creation of a new linked server (from 2008 sql box to 2000 sql box). I tested my select query and received Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "SQLNCLI10"...
View ArticleDatabase Info in HTML format
Someone gave this to me back in 2007. I don’t know the source. It doesn’t completely work and needs some fixing, but it gives you everything you ever wanted to know about a database in html format –...
View ArticleWrite to a text file without xp_cmdshell
There are dangers of xp_cmdshell. If turned on you can execute some pretty nasty commands. Combine that with a poorly written dynamic sql procedure and you have a hackers delight. It’s a window to...
View ArticleWhat’s the umbrella for? (part 2)
Earlier I wrote a post (What’s the umbrella for?) It seems like I’ve written a couple of posts regarding searching in the database for objects with text in them. Here is the latest way I’ve done it....
View ArticleSpecial Characters
It might be hard to work with special characters in your data. For instance, doing a replace on a field that looks like it has a blank (but is actually is carriage return) won’t yield the results you...
View Article