Hi,
I am looking for following values. ex: instead of 500.00 im getting 500 . I have tried TO_NUMBER(v_earningbasisamount, '9999999d99') format but no luck.
v_earningbasisamount
39.50
500.00
but i get
v_earningbasisamount
39.50
500
I am working on Oracle 11g. most of the code is removed to make code readable.
create or replace
PROCEDURE PRC_FILE_LOAD(
p_in_file_name IN VARCHAR2,
p_out_message OUT VARCHAR2)
IS
variable
v_earningbasisamount NUMBER(9,2);
CURSOR cur_accural_staging (cp_in_fileid IN VARCHAR2)
IS
SELECT * FROM whr_stageftd WHERE FILEID = cp_in_fileid;
BEGIN
--open files
v_file_handler := UTL_FILE.FOPEN(v_file_path, v_file_name, 'r');
LOOP
BEGIN
UTL_FILE.GET_LINE(v_file_handler, v_text);
EXCEPTION
WHEN no_data_found THEN
EXIT; -- end of file
END;
-------------------- Insert data in to whr_stageftd table -------------------------------
v_partnerid :=FNC_PIPE_PARSE (V_TEXT,13,'~');
v_addressline1 :=FNC_PIPE_PARSE (V_TEXT,14,'~');
v_transactioncode :=FNC_PIPE_PARSE (V_TEXT,15,'~');
v_earningbasisamount :=FNC_PIPE_PARSE (V_TEXT,16,'~');
v_transdesc :=FNC_PIPE_PARSE (V_TEXT,17,'~');
INSERT
INTO whr_stageftd
( transactioncode ,
earningbasisamount,
transactiondescription ,
)
VALUES
(
v_transactioncode ,
--- v_earningbasisamount ,
TO_NUMBER(v_earningbasisamount, '9999999d99'),
v_transdesc ,
);
END IF;
END LOOP;
COMMIT;
UTL_FILE.FCLOSE(v_file_handler);
END PRC_FTD_FILE_LOAD;
thanks
sandy