Using Oracle function TRANSLATE and REPLACE to remove special characters from a string.
This is the definition of the function.
TRANSLATE(expr, from_string, to_string)
Descrption: [FROM ORACLE DOCUMENTATION]
TRANSLATE returns expr with all occurrences of each character in from_string replaced by its corresponding character in to_string. Characters in expr that are not in from_string are not replaced. If expr is […]

I got an email from someone a couple of days ago. The email said
############## 
hi,
      i am having a problem here pls help me
 
this is my i/p and o/p pls tell me logic to develop this
 
input table or file
101,abc,5000
101,abc,2000
101,abc,1000
101,abc,1500
102,aaa,2000
102,aaa,1500
102,aaa,500
103,asa,1000
103,asa,300
103,asa,600
 
o/p table or file
0,101,abc,5000
1,101,abc,3000(i.e.,5000-2000)
2,101,abc,2000(i.e.,3000-1000)
3,101,abc,500(i.e.,2000-1500)
0,102,aaa,2000
1,102,aaa,500(i.e.,2000-1500)
2,102,aaa,0(i.e.,500-500)
0,103,asa,1000
1,103,asa,700(i.e.,1000-300)
2,103,asa,100(i.e.,700-600)
 
thanks and regards
******
##################
Oracle analytic functions were on my mind just like Ray charles (he had […]