Custom Sort
583143Nov 20 2008 — edited Nov 26 2008I have a wierd problem that has been causing me quite a few headaches and i think if there is a way to do a custom order by, it might get rid of this annoynce.
I have an existing script that is five scripts unioned together. When i run the script on it's own, i get the desired result in the desired order, but when i run it through a data window in powerbuilder it is bringing back a different order and i can't figure out why. It's the exact same script.
Anyways, i'm wondering if i can create a custom sort order by, so that i can specify what the first and second fields are and then let the rest fall as they are supposed to:
Here is a look at my Current results:
Equip_# - Read_Desc - Date ----------- Reading
------------------------------------------------------
12345 - Consumption - 10/05/2008 - 1101.88
12345 - Consumption - 10/05/2008 - 0000.00
12345 - Summer Peak- 10/05/2008 - 0000.00
12345 - Winter Peak - 10/05/2008 - 0000.00
12345 - Radio Device - 10/05/2008 - 0000.00
12345 - Demand ------- 10/05/2008 - 0000.00
I need the first two fields of the table to sorted as follows and then the rest can just fall into place:
Equip_# - Read_Desc - Date ----------- Reading
------------------------------------------------------
12345 - Consumption - 10/05/2008 - 1101.88
12345 - Demand ------- 10/05/2008 - 0000.00
...Doesn't matter how it sorts as long as they two come first
Hope someone can help, cause this really just doens't make a lot of sense and i'm now just trying to get this done and get it behind me.
thanks in advance