SQL Handling Null Values

Having Null Values in your database is a good thing despite those that might tell you otherwsie. Not only does it save space but it is a definitive “im empty” signature. There are of course proper and improper ways to handle SQL Nulls. Just remember never ever try to compare to a null using “=”.

1. A NULL value represents an UNKNOWN value

2. Under ANSI_NULLS ON, two NULL values will never be equal to each other because the two separate values are unknown. With ANSI_NULLS OFF, two separate NULL values will evaluate to equal values.

Any time a NULL value is present in a column that an aggregation is performed on, such as a COUNT, AVG, or SUM function, those values will be ignored and therefore not included in the functions result.

The COALESCE function returns the first non-NULL value in the field list that it accepts. The COALESCE function is very useful in a join operation or in queries where you are comparing a single value from a list of possible fields to a single value.

How To Restore All Your HTC Widgets

Recently my htc widgets have not been available for my home screen (friend stream, mail music, twitter etc) Im not sure what caused it but none the less its happened.

To get them back is pretty simple.

Note: this will completely reset your home screen layouts and wipe any saved layouts
1. Make sure you have over 15mb free space2. Open Settings
3. Select Applications
4. Select Manage Applications5. Scroll to HTC Sense and select it
6. Hit Clear data
7. Press the home button and wait
8. You will now see your widgets available when trying to add via one of the home screens