Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have a table with one column " otname "
table1.otname contains multiple rows of alpha-numeric string resembling the following data sample:11.10.32.12.U.A.F.3.2.21.249.1
2001.1.1003.8281.A.LE.P.P
2010.1.1003.8261.A.LE.B.BI want to read the fourth number in every string ( part of the string in bold ) and write a query in Oracle 10g
to read its description stored in another table. My dilemma is writing the first part of the query.i.e. choosing the fourth number of every string in a tableMy second query will be something like this:
select description_text from table2 where sncode = 8281 -- fourth part of the data sample in every string
Many thanks.
novice

Apologies it's not an exact answer: I can only speak from
MySQL experience but you may be able to find something
equivalent in oracle:SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(fieldname, '.', 4), '.', - 1)Alias this and you can use it in your "WHERE" clause

![]() |
Problem in inserting valu...
|
Data synchronization betw...
|
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |