We are looking at moving data from one table to another, please see the example tables below
Code:
Table 1
Id IncId Location
1 001 Wales
2 001 England
3 001 Scotland
4 002 Wales
5 003 England
6 003 Scotland
7 004 Wales
8 004 Scotland
We now need to get the above data into a new table
Code:
IncId Wales England Scotland
001 Yes Yes Yes
002 Yes
003 Yes Yes
004 Yes Yes
The only problem is that there is so much data in table one that the statement we created causes a memory issue. Is this possible with a loop statement and could someone help with this?