see this
SELECT 17
scan
c3=LEFT(ALLTRIM(CHRTRAN(examcode,"0123456789","")),3)
replace nmonth WITH Rep2(c3)
ENDSCAN
FUNCTION Rep2
PARAMETERS cMes
LOCAL cRes
* cRes =0
DO case
CASE UPPER(cMes) = "nov02"
cRes = 11
CASE UPPER(cMes) = "Oct02"
cRes = 10
CASE UPPER(cMes) = "Dec 02"
cRes = 12
CASE UPPER(cMes) = "Annual"
cRes = 2
CASE UPPER(cMes) = "April3"
cRes = 4
CASE UPPER(cMes) = "June03"
cRes = 6
CASE UPPER(cMes) = "August 03"
cRes = 8
CASE UPPER(cMes) = "sep 2003"
cRes = 9
CASE UPPER(cMes) = "Oct 2003"
cRes = 10
CASE UPPER(cMes) = "Nov 2003"
cRes = 11
CASE UPPER(cMes) = "December 03"
cRes = 12
CASE UPPER(cMes) = "Annual04"
cRes = 2
CASE UPPER(cMes) = "April 04"
cRes = 4
CASE UPPER(cMes) = "June 04"
cRes = 6
ENDCASE
RETURN cRes
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only