So I am working in an old system where the data structure is fixed, but we need to extract the master data….and its storage is a little funky…so…
Column A | Description | Next Value |
---|---|---|
ID1 | this is ID 1 | ID3 |
ID2 | this is ID 2 | |
ID3 | this is ID 3 | ID4 |
ID4 | this is ID 4 | ID5 |
ID5 | this is ID 5 |
So, I need to extract the data so that…..
-
ID1 contains sub values ID3, ID4 and ID5 i.e. from the “Next Value” field, it gives me the lookup for the next row
-
ID2 would have no sub values
-
There will only be one lookup value, but I don’t know how many times it needs to loop through to get the complete list of component items…
I cannot make any changes in the dbase, or even create any views…its very old and restricted…an option would be to extract the table to local dbase i.e. MSQL, but before I do all that, is there a way to loop through row values, to return the next value?
I do have a PHP script that is used to pull the data through onto a web interface, and this uses an array….mysql_fetch_array…not sure what can be used in SQL though…if at all