Hi Derek,
Keep in mind that when you use dynamic sql you've to give user rights to the tables involved into a query.
>
>The problem is that this SQL procedure needs to stand up on it's own, it's being used by various other platforms including VB and ASP from a web-site etc. The dynamic bit has to occur within the stored procedure, although I'm not too bothered about the fact that I lose the compiled benefit they give me.
>
>All I want to do is pass in the name of the table and let the SQL procedure do the rest.
>
--sb--