Posts Tagged ‘Tips & Tricks’
Passing “Order By” parameters w/o utilizing dynamic sql
Thursday, May 14, 2009 8:10 No CommentsSimilar to the SELECT and WHERE clauses, the ORDER BY clause can also utilize CASE statements. Within these CASE statements, the input parameter is evaluated and used to sort the result set as desired. For example, if you have a table with the following schema: 1: CREATE TABLE [CONTACT_TX_TB] ( 2: [CONTACT_SYSID] [int] IDENTITY(1,1) NOT [...]
Recursive Queries in SQL Server 2005 using CTE
Thursday, November 6, 2008 11:58 No CommentsCommon table expressions (CTEs) provide the significant advantage of being able to reference themselves, making recursion far simpler then earlier versions of SQL Server. CTEs consist of three parts: a name, an optional column list and a query. A recursive query also consists of three parts: an anchor member, a recursive member and a termination [...]
Fixed Positions in IE6
Wednesday, November 5, 2008 12:06 No Commentsokay, so your happy coding in css compliant world and then you remember … IE is not css compliant … but you’ve just written some code utilizing the "position: fixed;" property and value … you check IE 7 … all good … then IE 6 … rut roh raggy … enter conditional comments … yea [...]
Recursive Queries in SQL Server 2005
Thursday, September 18, 2008 15:34 No Commentsamong other improvements, SQL Server 2005 included a new XML datatype and enhanced XML functions … thus providing another solution for recursive queries … for example … if i want to get a list of all of the tables in my database with their associated columns … i might write the following query: 1: SELECT [...]