SQL to Insert a State table
Just in case this is useful to anyone else who needs a SQL table populated with the 50 U.S. states plus D.C.
insert [State] ([Abbreviation], [Name])
select 'AL', 'Alabama'
union
select 'AK', 'Alaska'
union
select 'AZ', 'Arizona'
union
select 'AR', 'Arkansas'
union
select 'CA', 'California'
union
select 'CO', 'Colorado'
union
select 'CT', 'Connecticut'
union
select 'DE', 'Delaware'
union
select 'DC', 'District of Columbia'
union
select 'FL', 'Florida'
union
select 'GA', 'Georgia'
union
select 'HI', 'Hawaii'
union
select 'ID', 'Idaho'
union
select 'IL', 'Illinois'
union
select 'IN', 'Indiana'
union
select 'IA', 'Iowa'
union
select 'KS', 'Kansas'
union
select 'KY', 'Kentucky'
union
select 'LA', 'Louisiana'
union
select 'ME', 'Maine'
union
select 'MD', 'Maryland'
union
select 'MA', 'Massachusetts'
union
select 'MI', 'Michigan'
union
select 'MN', 'Minnesota'
union
select 'MS', 'Mississippi'
union
select 'MO', 'Missouri'
union
select 'MT', 'Montana'
union
select 'NE', 'Nebraska'
union
select 'NV', 'Nevada'
union
select 'NH', 'New Hampshire'
union
select 'NJ', 'New Jersey'
union
select 'NM', 'New Mexico'
union
select 'NY', 'New York'
union
select 'NC', 'North Carolina'
union
select ...
Server Quest - A Day in the Life of a Geek
Somewhere in Redmond, someone wasn't busy for far too long:
http://www.microsoft.com/click/serverquest/
This is a heck of a demonstration of just what Silverlight can do though. Very, very impressive!
To learn how to create cutting edge Silverlight applications, sign up for one of our one-day technical courses at
http://events.sftsrc.com/
SQL 2008 Management Studio - Unable to Enumerate Databases
"If at first you don't succeed..."
Apparently the cool new conclusion to this motto is "throw your hands in the air and panic". This is certainly how the SQL 2008 Management Studio reacts when it encounters a problem enumerating object explorer information for one or more databases on a server. I recently installed the SQL 2008 tools and was quite surprised to encounter an error dialog following my first actions. I connected to a server that contains several databases, only a few of which I have rights to access. Upon expanding the Databases node in the Object Explorer window, I received...
SSRS doesn't LIKE me anymore
When is % not equal to %? When you're using the LIKE statement in SQL Server Reporting Services. If you've used the LIKE statement but haven't felt the love, it's because the standard wild-card operator (%) for a LIKE statement isn't the same in SSRS. Instead of the % operator they use *.
So the statement:
WHERE Customer.Email LIKE '%' + @qEmail + '%'
should instead be:
WHERE Customer.Email LIKE '*' + @qEmail + '*'