Our Oracle DBA is retiring and not being replaced, and I get to migrate all of 
our apps to MS-SQL. I was told to translate the following SP to ColdFusion but 
I really don't know Oracle well enough to understand what's going on in this 
SP. Can anyone help? The purpose of the procedure is to reorder time shet lines 
for proper display. Please reply to me directly as I am on digest format. 
Thanks for any help.
*------
CREATE OR REPLACE PROCEDURE
TC_RESEQ_LINES(employee IN VARCHAR2, per_start IN VARCHAR2)
AS
CURSOR exting_lines IS
SELECT LINE_ID, EMP_NO, PERIOD_DATE, LINE_SEQ, DESCRIPTION, WORK_ORDER, 
TASK_CODE, KOT
FROM FN.TC_LINES
WHERE EMP_NO = employee
AND PERIOD_DATE = TO_DATE(per_start, 'MM/DD/YYYY')
FOR UPDATE OF LINE_SEQ;

seq_no     NUMBER(3,0);
exting_lines_rec     exting_lines%ROWTYPE;

BEGIN
     seq_no :=1;
     OPEN exting_lines;
     FETCH exting_lines INTO exting_lines_rec;
     WHILE exting_lines%FOUND LOOP
          UPDATE FN.TC_LINES
                SET LINE_SEQ = seq_no
                WHERE CURRENT OF EXTING_LINES;
          seq_no := seq_no + 1;
          FETCH exting_lines INTO exting_lines_rec;
     END LOOP;
     COMMIT;
END;
/

Rebecca Wells
Systems Analyst
City of Renton - Information Services
425-430-6884

"Against logic there is no armor like ignorance."
  - Laurence J Peter


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273883
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to