dcmumbai
asked on
oracle split/substr/instrg help!!!!
Hi,
I want to spilt the following formula from oracle table column into different column.
table demo
srno act_code grp_code formula
1 10 100 =(2000/30)*10
I want result as follows
srno act_code grp_code formula Firstcol Secondcol
1 10 100 =(2000/30)*10 2000 30
Thanks in advance.
dcmumbai
I want to spilt the following formula from oracle table column into different column.
table demo
srno act_code grp_code formula
1 10 100 =(2000/30)*10
I want result as follows
srno act_code grp_code formula Firstcol Secondcol
1 10 100 =(2000/30)*10 2000 30
Thanks in advance.
dcmumbai
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Henka,
You are the Oracle Guru!!!!
Excellent !!!. Thank you very much. I tried different way's but didn't realised for - instr and -1. I appreciate your prompt help. I may need one more help in generating dynamic sql. I have created procedure it works fine for one month . I need it dynamic instead of static month value.
I will post it once I have done first part.
Once again thank you very much.
dcmumbai
You are the Oracle Guru!!!!
Excellent !!!. Thank you very much. I tried different way's but didn't realised for - instr and -1. I appreciate your prompt help. I may need one more help in generating dynamic sql. I have created procedure it works fine for one month . I need it dynamic instead of static month value.
I will post it once I have done first part.
Once again thank you very much.
dcmumbai
=(2000/30)*10
For Firstcol:
select substr(t.formula,2,instr(t
For Secondcol:
select substr(t.formula,instr(t.f
update demo set Firstcol=substr(formula,2,
Secondcol=substr(formula,i