I'm not to familiar with MS-SQL, but I don't think that parameter markers like this
SELECT @pthis FROM @tables
work.
Parameters are normally be used instead of literal values, not instead of identifiers.
inflagranti
2010-06-22 10:17:32