Pages

Thursday, January 24, 2013

Finding Empty ntext and varchar Fields in SQL

1 comments
Just the other day, I ran into another one of those little ‘slips your mind until you need it’ items.
In SQL, when checking for empty (no, NOT null, empty) fields with data types of ntext or varchar, querying for >’’ is not valid.
So, how can I find the records with empty fields? The test here would be to check for ANY string.
Well, LIKE ‘_%’ would be the way to do it.
For example, looking for records with an empty 'description' field (data type ntext) in a table with 200 entries:
SELECT * FROM widgets WHERE description IS NULL OR description NOT LIKE ‘_%’ 
would return the 17 records with empty or null description fields.
Conversely,
SELECT * FROM widgets WHERE description LIKE ‘_%’
would return the 183 records where there is something in the description field.
Continue reading →
Sunday, January 20, 2013

Price Increase on Windows 8

0 comments
If you're interested in picking up a license for Windows 8 now's the time to do it. Microsoft has announced an increase of $160 that will take effect on February 1st. The retail price will jump from $40 to $200. Here's the breakdown:
  • The Windows 8 Pro upgrade edition will be available online and at retail for $199.99 
  • The Windows 8 upgrade edition will be available online and at retail for $119.99 MSRP 
  • The Windows 8 Pro Pack will cost $99.99
  • The Windows 8 Media Center Pack will cost $9.99
Continue reading →

Labels