Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

TSQL Challenge 50 - Extracting a specifical range from random data wit Expand / Collapse
Author
Message
Posted Sunday, February 20, 2011 10:37 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Saturday, May 11, 2013 8:17 AM
Points: 460, Visits: 2,521
Comments posted to this topic are about the item TSQL Challenge 50 - Extracting a specifical range from random data wit

.
Post #1066875
Posted Monday, February 21, 2011 2:18 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen 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



Post #1066975
Posted Monday, February 21, 2011 9:24 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

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
Post #1067164
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse