About the author

Steven HarmanSteven Harman is a passionate developer who believes that writing great software isn't just a job, its a craft.

ASP.NET MVP

For recent posts and more about me, scroll to the bottom.

Subscribe

  • Subscribe to my feed. via RSS
  • Subscribe via email via email

Jobs

Badges

  • Subtext Project
  • Support Subtext
  • HiddenNetwork.com Banner

sql

There are 4 entries for the tag sql

A Better Search and Replace for Your Database

The ability to search for and replace a substring of text is such a useful, and often necessary, bit of functionality that nearly every text editor on the planet has it built in. However, the tool we often use to hold our text based data, the ubiquitous relational database, typically has very poor support for doing search and replace out of the box. Its so poor in fact that I’ve actually discussed this very topic, Search & Replace for your Database, before! However, as was noted in the comments to that post, my solution hack is not 100% effective....

Replace that Stinky Code with a Bitmask and the FlagsAttribute

Pretend that you’re building an application to do something like... oh I don’t know, track employee time. Applications like this exist in almost every company on the face of the earth. After all, time == money, duh! Lets also pretend one requirement of your time tracker is to keep track of the employee’s regular work hours - meaning their start/end times and the days of the week they work. Again, seems like a pretty simple and intuitive requirement for a time tracking system. So, here’s my question: how would you go about storing the days the employee works...

My 15 Most Popular Posts, via Ayende

Recently Ayende posted a simple SQL script for calculating the most popular posts in your Subtext blog. Being of the curious nature, I couldn't help but run the query against my own blog... The Results: iPod Shuffle - What I Learned My First Day. .Text's MetaWeblog API - Edit Post Error... Hotfix KB928388 - Revised Daylight Savings Time subText Reaches 1,000 Downloads - and Counting! Debugging a .NET WebApp in VS.NET Gaim - MSN Crashes Using MbUnit with COM+ 1.5 transactions... a big Gotcha! CVS - Keeping your branch(es) in sync... Notepad++...

Search & Replace - For Your Database

UPDATE: It appears that the .zip file I posted earlier was actually busted - I guess that's what I get for being lazy and not testing the parameterized version before putting it out there. Anyhow, Phil emailed me a version that actually works as advertised. I've updated the link at the bottom of this post, so grab the updated version from there. Search and replace is a common (and most useful) feature that is present in even the most basic of text editors. Some of the more powerful text editors (I like notepad++) even allow you to use Regular...