I need to build a stored procedure to insert data into different tables of a database.
Here each table is different from other in the concept of number of columns and data types.
Here i want to put different insertion statements in one single stored procedure.
so just by executing this stored procedure once, i want to insert data into one table based on the given table_name as input parameter to the store procedure.
Is this possible to develop a stored procedure like this?.
If possible ,Pls give me the syntax of the SP.
Thanks in Advance
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs).
Being someone who is always looking for alternatives to "work your data", I came across this …