Hello,
Can someone point me in the right direction to do the following as an insert query:
I have a table that I want to insert multiple rows for each existing item. Currently around 1000 items.
For each item I want to insert 21 new rows
and update a column (in example below Price).
eg the structure would end up looking like
ItemID Price
1 1
1 2
1 3
1 4
.... for 22 rows
1 22
2 1
2 2
2 3
..... etc
2 22
all the way to
1000 1
1000 2
1000 3
.....
1000 22
At the moment my table structure consists of one row per item eg.
ItemID Price
1 0
2 0
3 0
4 0
5 0
...
1000 0
thanks in advance
Can someone point me in the right direction to do the following as an insert query:
I have a table that I want to insert multiple rows for each existing item. Currently around 1000 items.
For each item I want to insert 21 new rows
and update a column (in example below Price).
eg the structure would end up looking like
ItemID Price
1 1
1 2
1 3
1 4
.... for 22 rows
1 22
2 1
2 2
2 3
..... etc
2 22
all the way to
1000 1
1000 2
1000 3
.....
1000 22
At the moment my table structure consists of one row per item eg.
ItemID Price
1 0
2 0
3 0
4 0
5 0
...
1000 0
thanks in advance