|TSQL - Cursor[^]
TSQL - Select statement[^]
TSQL - Insert[^]
This is some links to the msdn documentation on various method that you will need to employ to complete your task as you have stated. BUT as others have stated I would also look into the SELECT INTO commands
TSQL - Select Into[^]
if you need more help after this please post your sql statements that you have you and describe the problem that you are facing. Sadly no one will be willing to just hand you the code without any effort.
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON