Your code does the same, but it does use a derived table. You just forgot to give it a name. I think the code suggested by hmckillop will be more efficient, but maybe the optimizer treats them the same.
-Karl
[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]