Skip to content
Advertisement

SQL Server Insert Row: Inserting a row per “group”

I am wanting to insert multiple rows into a table based on the “Material” column. Attached below is a snippet of the table:

As you can see, there are three types of material here at three different stations – making for a total of 9 entries. Let’s say I wanted to add a “Station #4” row for each type of material. How can I insert per material “group”?

In my specific case, the “buildtime” value of Station #4 will all be identical with a value of 50.

This seems simple if there were truly only three material groups, but in the actual case, there are hundreds. Is there a way to parse through them and insert a row per group?

Thanks in advance.

Advertisement

Answer

You can use insert:

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement