Home » SQL & PL/SQL » SQL & PL/SQL » How to get a postion of a character in string
How to get a postion of a character in string [message #246271] Wed, 20 June 2007 08:20 Go to next message
donind
Messages: 95
Registered: February 2007
Member
How to get a position of a character in string

Ex
Table a
col1 col2 o/p
1 A, B, C, D, E 11
2 A, B, C, D 8
3 A, B, C, D, E, F 14
4 A, B, C, D, E, F, G, H 20

I need position of last colon.

Thanks
Re: How to get a postion of a character in string [message #246273 is a reply to message #246271] Wed, 20 June 2007 08:23 Go to previous message
Cthulhu
Messages: 381
Registered: September 2006
Location: UK
Senior Member
There isn't a colon in your input, but the answer would be:

select instr('X:Z:Y:Z:1:XX', ':', -1) FROM DUAL
Previous Topic: CrossTab
Next Topic: How to rollback a transaction which got commited
Goto Forum:
  


Current Time: Sun Dec 04 12:34:02 CST 2016

Total time taken to generate the page: 0.23613 seconds