You'll need to write a function to do this. Here's a great ready by Jeff Moden on the subject:
http://www.sqlservercentral.com/articles/Test+Data/61572/
John Rowan
======================================================
======================================================
Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden