There's already system stored procedure sp_executesql that allows to execute dynamically build sql statements. See BOL for details.
>Hello,
>
> i am using SQL 2000 for writing Functions in which i want to excute a SQL satement like (Select * From Tablname)
>
> But i want to pass the Field List and Table Name as a Parameters to the Function
>
> If any body knows then pls tell me with an example . . .
>
>Tnanx in advance,
>Amol
--sb--