substr and instr for variables assginement in a csv file
978485May 10 2013 — edited May 10 2013Hi gurus
Belows is my input csv file like with no fixedl enght
vinput_file:
WESTERN SAHARA,Moroccan Dirham,MAD,504,2,
YEMEN,Yemeni Rial,YER,886,2,
ZAMBIA,Zambian Kwacha,ZMW,967,2,
ZIMBABWE,Zimbabwe Dollar,ZWL,932,2,
and i want to assign 3 letter alphabetical to DESC and the 3 digit numerical to CODE
CODE := SUBSTR(vinput_rec,1,INSTR(vinput_file,',',1,1)-1);
DESC := SUBSTR(vinput_rec, INSTR(vinput_file,',',1,1)+1);
can anyone help me please with the above kindly