Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Ok - I'm trying to do a sort in powerbuilder 6.5. What I have is this situation....I am sorting by this field - let's just call it "priority"
Presently "priority" can be set to H,M, or L (for high, medium, low - respectively). I need to sort by this field - but it sorts alphabetically - so it is not accurate.
I'm trying to make an expression in powerbuilder SQL to set H=1 M=2 and L=3. I cannot seem to get it to work. What I have tried is:
if(priority = 'H', 1, 'M', 2, 'L', 3, 4)
--4 being if it isn't prioritized at all--It gives me an error - the only way I can get it to work is if i do something like...
if(priority = 'H', 1, 2)
This assigns all others to the value "2" - How can i get this to work?Any help is appreciated very much - i'm new to powerbuilder!

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |