Excluding last comma [message #428843] |
Fri, 30 October 2009 05:35 |
sumedh7
Messages: 31 Registered: March 2007 Location: Pune,India
|
Member |
|
|
Hi,
I'm trying to upload a file from txt file into table from oracle forms (10g), I'm using following
-------------------------------------------------------
TEXT_IO.GET_LINE(V_OUTFILE,V_LINEREAD );
V_LINE:= V_LINEREAD ;
V_EMP_CODE := TRIM(CHR(9) FROM SUBSTR(V_LINE,1,INSTR(V_LINE,',',1)-1));
V_CARD_NO := TRIM(CHR(9) FROM SUBSTR(V_LINE,INSTR(V_LINE,',',1,1)+1,-(INSTR(V_LINE,',',1,1)+1 -INSTR(V_LINE,',',1,2))));
after this it inserts data into table successfully, now problem is that to upload file i've to put comma (,)to last value for Ex
EMP_CODE CARD_NO
554,55454587,
556,55785687,
I tried this also
V_EMP_CODE := TRIM(CHR(9) FROM SUBSTR(V_LINE,1));
but it gets merged with card_no (554,55454587) in same coulmn.
Please advice how i exclude last comma?
Thanx in advance
|
|
|
|
|