[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Sorting
I think you would need to create an expression in the SQL that would
attempt to separate out the last name. Even if you did not want to print
it, once the expression exists you can sort on it.
Locate the last space by and substring the column starting at the
position after the space to the end of the column.
Thanks,
Al
_________________________________
>From the desk of Al Snodgrass
Internet: asnodgrass@banyan.com
CompuServe: 74512,646
Voice: 508-836-2866
-------------
Original Text
From: Benjamin Le <ble.DOMAIN1.oramail@ZEUS.CC.PCC.EDU>, on 2/23/96 3:54
PM:
To: "Multiple recipients of list SQR-USERS" <SQR-USERS@USA.NET>
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
___________________________________________________________________________