Subject Re: User defined self-join order (KAO: Svein)
Author venussoftop
Thanks Svein for your reply which I have pasted below

Yes, I have tried iLevel, iSrNo but the order all went wrong. A small eg. is as below:

Present state:
iID, iPID, cName, iSrNo
1, 0, Balance Sheet, 3
2, 1, Assets, 1
3, 2, Fixed Assets, 1
4, 2, Current Assets, 2
5, 1, Liabilities, 2
6, 5, Current Liabilities, 1
7, 5, Duties Payable, 2

Now user wants to modify iSrNo thus change the order for Assets and Liabilities as below: (also eg. Current and Fixed Assets)
1, 0, Balance Sheet, 3
5, 1, Liabilities, 1
6, 5, Current Liabilities, 1
7, 5, Duties Payable, 2
2, 1, Assets, 2
4, 2, Current Assets, 1
3, 2, Fixed Assets, 2

I have also tried to add iSrNo with iLevel and iID in case that gave a better sort but no joy

Thanks and regards
Bhavbhuti


--- In firebird-support@yahoogroups.com, wrote:
> Hi Bhavbhuti!
>
> Two things:
>
> 1) This question should be asked on firebird-support, not firebird-general, so
> please move the question.
>
> 2) I don't quite understand how you want things to be ordered (I assume you've
> already tried ORDER BY iLevel, iSrNo). Could you show us a small example based
on, say, 5-6 rows of data?
>
> Set