I find the syntax of CrossApply more elegant and easier to use than UnPivot. See for your self in this sample below. Let me know which one you prefer. /* Proof of concept for pivoting table with cross apply. Autjor:…
I find the syntax of CrossApply more elegant and easier to use than UnPivot. See for your self in this sample below. Let me know which one you prefer. /* Proof of concept for pivoting table with cross apply. Autjor:…
Removing duplicate Records in TSQL is likely to be a unique situation every time but there are enough consistent characteristics to the task that we can standardize some of it. I certainly would not want a one-button-click solution because that…
In TSQL IsNumeric evaluates data to see if it can be cast as any of ten numeric types of data: int, numeric, bigint, money, smallint, smallmoney, tinyint, float, decimal, real. The problem is that most of the time what we…
Sometimes we want to filter query results based on results from multiple fields from a sub-query or in a where clause but if you try this you’ll get and error message: Only one expression can be specified in the select…
Union tables join tables vertically, which is fine if you want one long set of data returned, but what if you want to compare data side-by-side in one table horizontally? And what if your are trying to conserve space by…
The SOUNDEX function in SQL, analyzes the phonetics of a given string of text and returns a value which can then be used to find similar values thus searching through text for similar sounding strings. The algorithm is actually a…
My favorite snippet of programming code is the ternary operator used to handle a Boolean evaluation (true/false). It is concise no matter which language Ruby, JavaScript or VB.net. Anatomy of the Ternary operator: A ternary is a two-step conditional method;…
This project, Face Off, derives its title from the popular John Travolta, Nicolas Cage movie of the same name. Basically, we re-skinned the Cambro site without touching the internal code and functionality. Cambro is a global manufacturing company for the…