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

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL help

Re: SQL help

From: Michael Ringbo <mri_at_dde-nospam.dk>
Date: Thu, 07 Jan 1999 16:53:44 +0100
Message-ID: <3694D887.75CE7984@dde-nospam.dk>


Hi Martin

It's a little curious way of dealing with your problem. Anyway I suppose you have your reasons for doing so. What I would propose is to add one more column to table B if possible. In this column you should store the starting position for each of the information in the A-column. If you do so you should (not testet) be ready for this select:

select b.column_heading, substr(a.info_row,b.start_pos,b.field_length) from a, b;

If you can't add a new column to B I can't give you any good advise just like that.

Hope it helps

Regards

Michael Ringbo

Martin Lynch wrote:

> 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
Received on Thu Jan 07 1999 - 09:53:44 CST

Original text of this message

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