|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Saturday, May 11, 2013 8:17 AM
Points: 460,
Visits: 2,521
|
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 7:34 AM
Points: 1,196,
Visits: 290
|
|
OK for a 'creativity' query but I feel this does not go well with RDBMS theory... Extract 'Odd' lines from an unsorted list? How can anyone treat the Expected Results as every second line in an UNSORTED list? Heap != Ordered set. Just because it happened in this case (the order returned from the SELECT *) this should NOT be expected to happen again. Now, it probably will in most cases but this is just a side effect of SQL Server have to deal with awkward realities as physical storage and such.
So, in my book, solving a query that violates database theory is WRONG as it might give the wrong idea of what we are actually supposed to do with our RDBMSes (and HOW we should think while doing it).
Just my 2 cents. Hanslindgren
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Tuesday, January 15, 2013 11:11 AM
Points: 1,945,
Visits: 2,782
|
|
1) The sample data has no key and not way to ever have a key, so it is not a table by definition. 2) Where is the spec that defines the subset?
Books in Celko Series for Morgan-Kaufmann Publishing Analytics and OLAP in SQL Data and Databases: Concepts in Practice Data, Measurements and Standards in SQL SQL for Smarties SQL Programming Style SQL Puzzles and Answers Thinking in Sets Trees and Hierarchies in SQL
|
|
|
|