-
Fun with #region
I am not sure if I did this on accident, or my intern did it, but I found this in my code: #region Constructors//code here #endregion Constructors I was not aware you can put a tag after #endregion. Kind of nice to clearly delineate long regions. Not that it really matters, but Visual Studio allows…
-
Using SQL Where Clauses for Searching
One piece of SQL lore I take for granted is COALESCE(). The dictionary definition describes SQL's use pretty close as “To bring or come together into a united whole”. Books Online states in laymans terms that SQL allows you to pass any number of arguments to the function, and it will return the first non-null…
-
Retrieving Values from SQL Exec()
Never had a good reason to do this up until now, but if you need to get a value from a generated sql string, there are a few hoops you must jump through. Example: declare @table varchar(20) ,@username varchar(30)–can't use double quotes w/out this :)SET QUOTED_IDENTIFIER OFF–set your variablesselect @table = 'tblcustomers' ,@username = 'webmaster'–create…
-
Let My People Go
Ahh, Passover…how fondly I remember thee. A lot of food: A lot of wine: And plenty of prayers: In all seriousness, one of the best Passovers. The food was phenomenal thanks to my mother-in-law and aunt-in-law for the majority, and the company was good fun. The trick is having 3 or 4 times more people…
