Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: *SQL: display part of query result?
> I'm trying to figure out how to display just part of the result a query. For
> example when I query the table and got the following:
>
> Server=Server/jam.mib.port.JAMEntity=S02-OC3p4-1%jam.mib.SdhTypes
>
> Is there a way to just display the "S02-OC3p4-1" as a result and not the
> complete line?
Only if the result set is consistent. In the case of the above example the following would work:
Select the substring that appears between an INSTR looking for the position of the equals size (=) and an instring looking for the position of the second dash (-) using the position of the second dash and the position of the equals sign to calculate the number of characters in the substring function.
If your data is inconsistent ... then no.
Daniel A. Morgan Received on Wed Mar 14 2001 - 00:14:56 CST
![]() |
![]() |