I am after some help. I need to search a string from within oracle 10.2
the string is made up of info seperated between "," but the order of the info can change
I need something to search for the first 3 letters ie "swo" or "can" or "dos" then return the info that is between the ",".
so search for "can"
returns = can55
I dont think a standard sql script will be able to do this more like a package or something
Can anyone help
I will attach a script that I use to return info from "," but what I am after this wont work.
I dont think
CREATE OR REPLACE PACKAGE BODY IFSAPP.hert_column_sort IS
FUNCTION col(text_in IN VARCHAR2, number_in IN NUMBER)
number_in_ := number_in;
text_in_ := text_in;
IF number_in_ <=0 THEN
tempval := 0;
ELSIF number_in_ = 1 THEN
tempval := to_number(substr(text_in_,1,instr(text_in_,';')-1));
tempval := to_number(substr(text_in_,instr(text_in_,';',1,number_in_-1)+1,instr(text_in_,';',1,number_in_)-1-instr(text_in_,';',1,number_in_-1) ));