The fastest way to empty a select element: replace it with a shallow copy of itself.
function ClearOptions(id) {
var selectObj = document.getElementById(id);
var selectParentNode = selectObj.parentNode;
var newSelectObj = selectObj.cloneNode(false); // shallow copy, no options
selectParentNode.replaceChild(newSelectObj, selectObj);
return newSelectObj;
A T-SQL user defined function that converts text to proper case, capitalising the first letter of every word.
CREATE FUNCTION ProperCase(@inpStr nvarchar(8000))
RETURNS nvarchar(8000) AS
BEGIN
DECLARE @Result nvarchar(8000)
SET @inpStr = LOWER(@inpStr) + ' '
SET @Result = ''