--Enter any name in the select field return string query.
SELECT substr('Surya DTJ Chennai', 1, Instr('Surya DTJ Chennai',' ',1,1)-1)name,
Substr('Surya DTJ Chennai', Instr('Surya DTJ Chennai',' ',1,1)+1,Instr('Surya DTJ Chennai',' ',1,2)-Instr('Surya DTJ Chennai',' ',1,1))company,
Substr('Surya DTJ Chennai', Instr('Surya DTJ Chennai',' ',1,2)+1) city
FROM DUAL;
Select Substr('suriya$$dtj$$chennai',1,Instr('suriya$$dtj$$chennai','$',1,1)-1)Name,
Substr('suriya$$dtj$$chennai',Instr('suriya$$dtj$$chennai','$',1,2)+1,Instr('suriya$$dtj$$chennai','$',1,3)-1-Instr('suriya$$dtj$$chennai','$',1,2))Company,
Substr('suriya$$dtj$$chennai',Instr('suriya$$dtj$$chennai','$',1,4)+1)city
FROM DUAL;
SELECTSubstr('kumaravelu/dtj/madurai/600082',1,Instr('kumaravele/dtj/madurai/600082','/',1,1)-1)Name,
Substr('kumaravelu/dtj/madurai/600082',Instr('kumaravele/dtj/madurai/600082','/',1,1)+1,Instr('kumaravelu/dtj/madurai/600082','/',1,2)-1
-Instr('kumaravelu/dtj/madurai/600082','/',1,1))company,
Substr('kumaravelu/dtj/madurai/600082',Instr('kumaravele/dtj/madurai/600082','/',1,2)+1,Instr('kumaravelu/dtj/madurai/600082','/',1,3)-1
-Instr('kumaravelu/dtj/madurai/600082','/',1,2))City,
Substr('kumaravelu/dtj/madurai/600082',Instr('kumaravelu/dtj/madurai/600082','/',1,3)+1)Pincode From Dual;
SELECT Substr(:Get_Char,1,Instr(:Get_Char,'/',1,1)-1)Name1,
Substr(:Get_Char,Instr(:Get_Char,'/',1,1)+1,Instr(:Get_Char,'/',1,2)-1-Instr(:Get_Char,'/',1,1))Company,
Substr(:Get_Char,Instr(:Get_Char,'/',1,2)+1,Instr(:Get_Char,'/',1,3)-1
-Instr(:Get_Char,'/',1,2))City,
Substr(:Get_Char,Instr(:Get_Char,'/',1,3)+1)Pincode From Dual;
SELECT substr('Surya DTJ Chennai', 1, Instr('Surya DTJ Chennai',' ',1,1)-1)name,
Substr('Surya DTJ Chennai', Instr('Surya DTJ Chennai',' ',1,1)+1,Instr('Surya DTJ Chennai',' ',1,2)-Instr('Surya DTJ Chennai',' ',1,1))company,
Substr('Surya DTJ Chennai', Instr('Surya DTJ Chennai',' ',1,2)+1) city
FROM DUAL;
Select Substr('suriya$$dtj$$chennai',1,Instr('suriya$$dtj$$chennai','$',1,1)-1)Name,
Substr('suriya$$dtj$$chennai',Instr('suriya$$dtj$$chennai','$',1,2)+1,Instr('suriya$$dtj$$chennai','$',1,3)-1-Instr('suriya$$dtj$$chennai','$',1,2))Company,
Substr('suriya$$dtj$$chennai',Instr('suriya$$dtj$$chennai','$',1,4)+1)city
FROM DUAL;
SELECTSubstr('kumaravelu/dtj/madurai/600082',1,Instr('kumaravele/dtj/madurai/600082','/',1,1)-1)Name,
Substr('kumaravelu/dtj/madurai/600082',Instr('kumaravele/dtj/madurai/600082','/',1,1)+1,Instr('kumaravelu/dtj/madurai/600082','/',1,2)-1
-Instr('kumaravelu/dtj/madurai/600082','/',1,1))company,
Substr('kumaravelu/dtj/madurai/600082',Instr('kumaravele/dtj/madurai/600082','/',1,2)+1,Instr('kumaravelu/dtj/madurai/600082','/',1,3)-1
-Instr('kumaravelu/dtj/madurai/600082','/',1,2))City,
Substr('kumaravelu/dtj/madurai/600082',Instr('kumaravelu/dtj/madurai/600082','/',1,3)+1)Pincode From Dual;
SELECT Substr(:Get_Char,1,Instr(:Get_Char,'/',1,1)-1)Name1,
Substr(:Get_Char,Instr(:Get_Char,'/',1,1)+1,Instr(:Get_Char,'/',1,2)-1-Instr(:Get_Char,'/',1,1))Company,
Substr(:Get_Char,Instr(:Get_Char,'/',1,2)+1,Instr(:Get_Char,'/',1,3)-1
-Instr(:Get_Char,'/',1,2))City,
Substr(:Get_Char,Instr(:Get_Char,'/',1,3)+1)Pincode From Dual;
No comments:
Post a Comment