Earlier on I wrote about how you can Select just the date part from a DateTime or SmallDateTime data type. (See [story:t-sql-date-without-time]) Using the CONVERT( … , … , style ) function we can specify the style attribute, that lets us specify to SQL Server (using style 14 or 114) that we just want the […]
You are browsing archives for
Month: August 2005
PromptSQL Intellisense for SQL Server user and system objects
I don’t know how long I’ve been waiting for this, but someone has finally built an Intellisense tool for SQL Server Management Studio & Query Analyzer. If you’ve been using Visual Studio.Net 2003 or 2005, you’ll know how useful Intellisense is in other programming languages (it’s like auto-complete in Word). I don’t know why it’s […]
Q&A: Why does WHERE LEN(columnname) = 0 skips NULL values?
Q: When I use the condition LEN(columnname) = 0, I don’t get columns where columnname value is null. Why? Shouldn’t LEN(NULL) = 0 ? Are my ANSI_NULLS or ANSI_DEFAULTS setting to blame? A: No. LEN(NULL) will always return NULL. From SQL Server Books Online Null Values A value of NULL indicates the value is unknown. […]