You can't do what you want like that but you can do it like this
create procedure Testing
exec('select * from ' + tabname)
There are a few issues though. There is no real benifit to doing this you
might as well just issue the sql statement as the optimiser will have to do
work each time this is called.
It is more typical to have a SP per function not one SP to cover all tables.
I hope this helps
Greg O MCSD
SQL Scribe Doentation Builder
Doent any SQL server database in minutes
Programmers love it, DBA dream of it
AGS SQL Scribe download a 30 day trial today
"Lovely Dola" <com> wrote in message