Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL help
Sounds like you need a PL/SQL block which reads the column in table A into
an array and then uses the SUBSTR function to return the compunent you are
interested in. A user defined function may be appropriate here.
Eugene.
> Hi
>
> Im fairly new to oracle and ive been asked to do something like this.
>
> Define a table (table A) which has one column, but this column contains 1 or
> more fields concatenated.
>
> Then define another table (table B) which describes the first table in terms
> of field length and type etc.
>
> EG TABLE A
> row1 1234567890 (10 chars in the column)
>
> TABLE B
> row1 field 1 length 4
> row2 field 2 length 6
>
>
> A program would then be written which would look at table B and get the data
> definations in it and use this to manipulate the data in table A and display
> it in thenecessary form. Something like this
>
> OUTPUT
> part number 1234
> amount available 67890
>
> It is this program i need help with. Hope some one can help
>
> marty
>
>
Eugene Gardner.
Oracle Certified dba available for hire on NT or VMS platforms.
Received on Thu Jan 07 1999 - 12:12:58 CST
![]() |
![]() |