|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Today @ 8:06 AM
Points: 3,163,
Visits: 4,343
|
|
Comments posted to this topic are about the item How many partitions?
____________________________________________ Space, the final frontier? not any more... All limits henceforth are self-imposed. “libera tute vulgaris ex”
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Today @ 7:53 AM
Points: 1,868,
Visits: 1,044
|
|
Hi ,
I guessed correctly as 4.but i executed the script it is throwing error in the last statement.because group by is not there in the last statement.
Is it working for sqls server 2005 or 2008?
after throung error i put group by and executed it is showing zero rows.
unfortunately i put answer as zero but anser is correct.
Malleswarareddy I.T.Analyst MCITP(70-451)
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Today @ 8:06 AM
Points: 3,163,
Visits: 4,343
|
|
malleswarareddy_m (8/11/2010) Is it working for sqls server 2005 or 2008? Logical partitioning of tables was introduced with SQL Server 2005.
____________________________________________ Space, the final frontier? not any more... All limits henceforth are self-imposed. “libera tute vulgaris ex”
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 6:13 AM
Points: 5,296,
Visits: 7,236
|
|
malleswarareddy_m (8/11/2010)I guessed correctly as 4.but i executed the script it is throwing error in the last statement.because group by is not there in the last statement. Based on visual inspection of the code, you appear to be right about the missing GROUP BY. I'm glad I overlooked that when answering! Luckily, there is no generic "error" answer option, so people will hopefully realise that this is an unintended mistake.
after throung error i put group by and executed it is showing zero rows. Did you load the table with data? Millions of rows is not necessary, but at least one in every partition is.
Hugo Kornelis, SQL Server MVP Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 4:19 AM
Points: 1,115,
Visits: 1,210
|
|
The query without group by looks strange. In case the table is populated, it must return millions of rows.
See, understand, learn, try, use efficient © Dr.Plch
|
|
|
|
|
UDP Broadcaster
      
Group: General Forum Members
Last Login: Tuesday, August 16, 2011 7:08 AM
Points: 1,493,
Visits: 181
|
|
Question is tricky. At a glance, it seems to have syntax error as there in no GROUP BY clause. But, if we ignore it then
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 8:06 AM
Points: 1,384,
Visits: 4,878
|
|
Hugo Kornelis (8/12/2010) Based on visual inspection of the code, you appear to be right about the missing GROUP BY. I'm glad I overlooked that when answering! Luckily, there is no generic "error" answer option, so people will hopefully realise that this is an unintended mistake.
I spotted the missing group by, so assumed that since none of the non-error options could possibly be right, it must be the first option, and that the error was being raised before it got as far as the 'no group by' error.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 6:13 AM
Points: 5,296,
Visits: 7,236
|
|
Frankly, I never understand why people do take the considerate effort to assemble and submit a question, along with an explanation and some believable answer options, and then don't take that tiny bet of extra effort to ensure no unintended syntax errors by copying and pasting their code in SSMS and hitting the execute button. That should not take more than a minute, tops!
Hugo Kornelis, SQL Server MVP Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, January 31, 2013 8:01 AM
Points: 1,232,
Visits: 1,046
|
|
| I selected error becuase with the given code example it was the answer closest to the result. I understand the point your question was trying to make. Your question failed to provide the right answer not me. Please corrrect this.
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: 2 days ago @ 8:01 AM
Points: 989,
Visits: 1,795
|
|
| OK, so it wasn't just me staring and trying to decide between "error" and "4" then. Finally picked "4" because that error wouldn't be the GROUP BY error.
|
|
|
|