Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: help with sql
Brian (withholding surname) wrote:
> Hi, I am using Java to query 10g database. I have table containing this
> information
>
> ID EMAILTO
> ---- ---------------------------------
> 1 Sangster, Derek; Williams, Mary G; Phillpot, Mark
> 17 Williams, Mary G
> 29 Cunningham, Peter; Richards; Peter
>
> I want to turn this into columns LASTNAME and FIRSTNAME
> 1 Sangster Derek
> 1 Williams Mary G
> 1 Phillpot Mark
> 17 Williams Mary G
> 29 Cunningham Peter
> 29 Richards Peter
>
> I am query database so can only use SQL and not procedures PLSQL. How
> can I do this? URGENT.
>
> Brian
Nice surname...
Anyway, look up usage of the two SQL built-in functions SUBSTR and INSTR in the SQL Reference manual:
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/toc.htm
HTH -g Received on Thu Jul 06 2006 - 06:14:04 CDT