SQL - Error HandlingAug 10 2011, 19:00 PM

Yet another “new” feature of MS SQL 05 is an often overlooked “error handling”. The Transact-SQL Try…Catch is designed to operate similar to the exception handler in the Visual/.NET languages- if an error occurs inside the TRY block of a query, control is passed to another group of statements that is enclosed in a CATCH block (and on)…

Keep Reading »

  Comment

SQL - The Power of APPLYJul 06 2011, 19:10 PM

MS SQL 2005 and up adds support for the APPLY clause, which, in turn, lets you join a table to any dynamic sets, such as table-valued-functions or even derived tables. While we can argue over the benefits and dangers of the latter (another set of article perhaps?), being able to do things more than one way is certainly always awesome.

Keep Reading »

  Comment

SQL - The Danger of NULLsFeb 14 2011, 17:40 PM

Following up on the previous article SQL – The Power of NULLs, here are some of the things to keep in mind when you do decide to use NULL in your work.

Keep Reading »

  Comment

SQL - The Power of NULLsFeb 01 2011, 14:57 PM

Some people despise NULLs for their unusual behavior and apparent complexity, while some remain suspicious simply because of a lack of experience with them. Although at times it is not a good idea to use them in database design, they often come in handy in queries alone. They let us easily test for the “third case”- complete lack of data. Assume you have a bit column that only allows 0 and 1, so you can distinguish if something is “on” or “off”, what better way than the NULL is there for you to test for the row’s presence, or vice versa?..

Keep Reading »

  Comment

Fighting Spam at the SourceApr 19 2003, 06:11 AM

There are a lot of ways for a spammer to get your e-mail. They can buy it in a package of a thousand e-mails from a third-party; they can get it by asking you to “register” with them; they can use [..]

Keep Reading »

  Comment