robert-695083 (4/6/2010)
Seems you cant use Order By new() in a function unless it is in Dynamic sql. And the only way I could find to use it was in openrowset...Any other idea?
You can trick it, though. Create a view with nothing in it but SELECT NEWID() AS SomeNewID and you can call the view from the function.
--Jeff Moden
Change is inevitable... Change for the better is not.