Hi.
I have data from our enterprise software, Mas 200, Purchase Order details. I need to be able to sort the data the same way Mas 200 does, externally. I am confident that if I sit down and write vb code, I can do this, but I am hoping a strong SQL person will see a simple solution.
The first record, in order, has 0 in the linktopreviousline field. In that records link to next line, contains the lineindex of the second. That records link to next line, again contains the line index of the third, until you reach a record with a link to next line, containing 0.
Any SQL suggestions would be greatly appreciated.
Thanks,
ChaZ
There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.
I have data from our enterprise software, Mas 200, Purchase Order details. I need to be able to sort the data the same way Mas 200 does, externally. I am confident that if I sit down and write vb code, I can do this, but I am hoping a strong SQL person will see a simple solution.
The first record, in order, has 0 in the linktopreviousline field. In that records link to next line, contains the lineindex of the second. That records link to next line, again contains the line index of the third, until you reach a record with a link to next line, containing 0.
Any SQL suggestions would be greatly appreciated.
Thanks,
ChaZ
Code:
PO LinkToPreviousLine LinkToNextLine LineIndex Item
0053370 0 19013 18719 202251
0053370 18719 18720 19013 204615
0053370 19013 18721 18720 203334
0053370 18720 18723 18721 203730
0053370 18721 18757 18723 208142
0053370 18723 18726 18757 203466
0053370 18757 19557 18726 204781
0053370 18726 19658 19557 208144
0053370 19557 18907 19658 209113
0053370 19658 18917 18907 206837
0053370 18907 18916 18917 207660
0053370 18917 0 18916 206453
There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.