[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Sorting



Hi there
I don't know if this is the right place to get help about this situation.
How do you sort the last word in a field which has first name, middle(some none
middle) and last name separated by space in the begin-select query:

begin-procedure main
begin-select
shbdipl_name    &diploma_name
  print &diploma_name (+1,1)
from saturn.shbdipl
where ...
ORDER BY ???
end-select
end-procedure

SHBDIPL_NAME is student full name field. What I want is sort that field by the
last word(last name). I'm really strugling with this. Your help is appreciated.
Exp:
Benjamin Le
John B. Adams
Smith J. Johnson
How do you sort by Le, Adams and Johnson?

Thanks.



___________________________________________________________________________
Benjamin Le                                           Voice: (503)-977-4970
Portland Community College, Information Technology    Fax  : (503)-977-4987
P.O. Box 19000, Portland, Oregon 97280-0990           Internet: ble@pcc.edu
___________________________________________________________________________