I would like to create a price-simulation for 12'000 securities. At the end, it will be very complex. But I am new to SQL so I would like to start step by step. Right now, I am wondering how a code can look like for a price-simulation for each of the 12'000 'Stocks' at once where the 'price' from the table 'WBI' has to reach the level of 'sector-prize' from the table 'WBI' in steps of 0,1% and then freeze the last price before reaching 'sector-prize' so I can use the freezed price in the next procedure. The 'price' can be above or below 'sector-prize' so it has to go both ways.
PS: I know that described as above, I only need to take 'sector-prize' less 0,1% makes the freezed-price. But as this is a first step which I have to change further, I am looking for a loop that takes me the 'price' in 0,1% steps to 'sector-prize'