Skip to main content


Showing posts from January, 2011

TSQL SmallDateTime vs DateTime

Today I noticed an odd little quirk about TSQL (Microsoft SQL) and SQL Server. If you have a smalldatetime, you only record date + hours + minutes. To get seconds, millis, and such, you need the full datetime.

Well, if you are using "getdate()" to compare against the smalldatetime, then know that smalldatetime rounds the seconds UP to the next minute. The smalldatetime on 12:36:24.00 is actually 12:37:00.00.

This caught me today in a query where I was doing a select looking for a record that occured after the last insertion time (smalldatetime) using "getdate()". That was always returning empty because the getdate() to smalldatetime conversion was giving me a date that was in the future thanks to the round-up behavior.

To work around it, I had to convert(smalldatetime,getdate()) and then compare against my smalldatetime values.

If you are inserting records with smalldatetime and using getdate() as the smalldatetime value, then those records will be recorded up to 1 mi…

How To Cancel ATT Uverse

I was a subscriber to the AT&T Uverse service for a little over 2 years. In that time, we had experienced good service for the first year, and then it sucked. After 12 months, or there in, the service degraded quickly, and would stop working all together at times. At first it would die for a short period of time, usually when we were not home. Then it would get progressively worst, until there was an entire week of no service. We had technicians at the house trying to fix the service, but it would repeat the behavior quite consistently.

On January 15th we finally gave up and switched to a lesser service, COX TV and Internet. In the past we had cable service and it was always reliable, but not as good as the AT&T digital service. COX doesn't have nearly as many HD channels, but that's not enough. We needed internet to be reliable, and AT&T couldn't deliver that.

Cancelling the AT&T service was a nightmare. Try to find anything about such things on their web si…