>>As far as i know
>>Insert data returned by sp_pkeys in #temp and use in you query.
>
>There're other ways. See Message #
796855, for example. I'm pretty sure that in SQL 2005 one of sys system views should have this info as well.
Thanks, this worked nicely.
If it's not broken, fix it until it is.
My Blog