AnsweredAssumed Answered

Problem reading data from CSV File

Question asked by Prabhu_Vemuri on Jun 10, 2010
Latest reply on Sep 14, 2010 by Chris_Hackett
Hi,

I am trying to read data from CSV file and load it into a table using a gel script. The problem I am facing is some times my code is trying to insert the header values into the table and Oracle is throwing an error. This only happenss when I try to start multiple instances of the procesess.

The code I am using is



<file:readFile delimiter="," embedded="false" fileName="${TEMPFolder}/Files/${file}" var="v_csvInMem"/>


<core:forEach begin="1" indexVar="v_csvRowRead" items="${v_csvInMem.rows}" step="1" trim="true" var="v_row">

Any help is appreciated..


Error message in Log:

INSERT INTO WS_FIN_UPLOAD_TEMP ( ID, CUSTOM_OBJECT_ID, INITIATIVE_ID, WS_NAME,WS_START, WS_FINISH, REGION, WS_CLUSTER,RAG_STATUS,GL_ACCOUNT, EST_RR, EST_FISCAL_MINUS_2, EST_FISCAL_MINUS_1, EST_FISCAL_0, EST_FISCAL_1, EST_FISCAL_2, COMP_RR, COMP_FISCAL_MINUS_2, COMP_FISCAL_MINUS_1, COMP_FISCAL_0, COMP_FISCAL_1, COMP_FISCAL_2, CURRENCY, CLUSTER_ID, IS_PROCESSED) VALUES ( 'SLNO', '5007760', 'Parent Initiative ID', 'Work Stream Name', to_date('Start Date','MM/DD/YYYY'), to_date('End Date', 'MM/DD/YYYY'), 'Region', 'Cluster', 'Rag Status', 'GL Account', 'Estimated RR', 'Est. Fiscal Saves (CY-1)', 'Est. Fiscal Saves (CY-2)', 'Est. Fiscal Saves (CY)', 'Est. Fiscal Saves (CY +1)', 'Est. Fiscal Saves (CY +2)', 'Completed RR', 'Comp. Fiscal Saves (CY-1)', 'Comp. Fiscal Saves (CY-2)', 'Comp. Fiscal Saves (CY)', 'Comp. Fiscal Saves (CY +1)', 'Comp. Fiscal Saves (CY +2)', 'Currency Code', '5000053', 'N'): [CA Clarity][Oracle JDBC Driver][Oracle]ORA-01858: a non-numeric character was found where a numeric was expected

Outcomes