Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Insert values with selected values

$
0
0

Hello! I have some lines that I have to insert into my table but changing the id of my values() specification.

Ex.: SELECT * FROM PROJECT

it will bring me these values 1,3,4,7,8.
Now I need to add these values into my other table

(project, 'value1','value1'),(project, 'value2','value2'),(project, 'value3','value3'),(project, 'value4','value4'),...

where project must be these values, 40 inserts for project 1, 40 inserts for project 3, and so on, total 200 inserts.
How can I do this? I use sql server 2008


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>