Hi!
Please allow me to illustrate my question. I have a table called employee with the columns empid, last, first, mid, address and city. I've cloned this table to employeecl with the columns empid, last and first.
In my storeprocedure I want to select employeecl(empid,last,first) from employee so the next time I want to add a field to be selected in my SP I just have to add it in my clone table without anymore editing my SP, meaning columns that will be specified in my SP will depend on the columns available in the clone table which is also available in the source table. My cloned table does not contain values only fields. Do you think this is possible if so please help me I will use this in my project as I'm assigned to make our SPs dynamically.
Your help would be a great help.
Thank you!
In my question above iam using sql server 2005 actually i just want to make my stored procedure dynamic meaning i want to create select statement inside sp "Can i store fields in a table no records just fields and use that tablefields in my select statement?"