Hi to all:
I have a questions and i really need help on that. Please help me....
I have to export the checkin days from the database days of the week..
i have store in the database 7 days
Sunday id 1
monday id 2
tuesday id 3
wednsday id 4
thursday id 5
saturday id 6
it is like week start from sunday.... when i retrieve the data from the database
i'm using the cursor for that... it is retrieve like if the checkin days is
Monday,Saturday,Sunday instead that order it is retrieve for me like
Saturday,Sunday,Monday and if i'm trying to do any order it is not right.
I think it is should be retrieve in array to get right but i do not know how...
i never did this brfore please if someone know how i have to do this please tell
me

This is a code what i'm using for that....
Long ll_comid
Long ll_lang_id
Long ll_len
String ls_rtn
String sz_chkin
String ls_delimeter



ll_lang_id = inv_lang_id

ll_comid = dw_com_id.Getitemnumber(1,'com_id')

ls_delimeter = char(9)



DECLARE checkin_cur CURSOR FOR



SELECT trim(CHEDES2_TEXT)
FROM CHECKIN_DESC2,
CHECKIN
WHERE CHEDES2_ID = CHE_ID and che_com_id = :ll_comid
and chedes2_lang_id = :ll_lang_id

USING sqlca;




OPEN checkin_cur;

FETCH checkin_cur

INTO :sz_chkin;

ls_rtn = ''


do While sqlca.SQLCode = 0

if (sz_chkin <> '') and len(sz_Chkin) > 1 then

ls_rtn = ls_rtn + trim(sz_chkin) + ', '
end if

FETCH checkin_cur INTO :sz_chkin;
Loop

Close checkin_cur;



ls_rtn = trim(ls_rtn)

ll_len = len(ls_rtn)

if (ll_len > 0) then


IF Right (ls_rtn, 1) = ',' THEN
ls_rtn = Left (ls_rtn, Len (ls_rtn) - 1)
END IF
END IF




return ls_rtn
Thank you.














---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp


---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp