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

Re: Sorting in SQR



To extend the attached reply, some database platforms allow you to ORDER your
data via the SUBSTR() function (see you database manual for specific syntax):

....
SELECT X, Y, Z
FROM A
ORDER BY SUBSTR(FIELDNAME,#N,#M)
....

Where #N is the starting point within the field and #M is the number of
spaces...

For example, character field containing the value STEFFON:
SUBSTR(FIRSTNAME,1,4) would return STEF.

Good luck,
Steffon