Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 need to generate sitemaps

Author  Topic 

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2011-11-09 : 16:18:40
Greetings

I would like to carve up 323260 rows in groups of 50,000 in order to generate sitemap xmls for our web site (50,000 is the limit for sitemaps)

ROW_NUMBER() OVER(ORDER BY SiteMapUrl DESC) AS 'Row Number' gives me dynamic row numbers.

Next I want to use NTILE but am not sure how to go about using this lovely function.



If you don't have the passion to help people, you have no passion

X002548
Not Just a Number

15586 Posts

Posted - 2011-11-09 : 16:21:11
care yto post the table DDL, some sample data in DML Form and what the expected results should be

No you don't have to post 50,000 rows

We can pretend with 10



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-11-10 : 00:38:26
see examples of NTILE here

http://www.fotia.co.uk/fotia/DY.02.TheNtileRankingFunction.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -