Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: *SQL: display part of query result?

Re: *SQL: display part of query result?

From: Daniel A. Morgan <dmorgan_at_exesolutions.com>
Date: Tue, 13 Mar 2001 22:14:56 -0800
Message-ID: <3AAF0C60.8B518C4E@exesolutions.com>

> 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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US