Re: creating a flat file, using 2 or more tables
Date: Mon, 03 Apr 2000 13:52:06 GMT
Message-ID: <8ca7m0$v37$1_at_nnrp1.deja.com>
In article <8ca5l1$btk$1_at_rl0001.unimaas.nl>,
"Ruud Schmeitz" <R.Schmeitz_at_MEMIC.UNIMAAS.NL> wrote:
> Hi readers,
>
> We have an Oracle database which contains a parent table and 15
> child tables (1:n).
> Our clients use specific data-analysis software, which requires a
> flat file as input. This flat file (with only 1 record for every
patient)
> should contain the data from the parent table and 1 or more child
> tables.
>
> The question of course is, how to create this flat file ?
> I can't use a SELECT statement for this, because then I get (much)
> more than 1 record for every patient.
>
> Is there an easy way to do this in Oracle ?
>
> Tia,
>
> ============================================================
>
> "Live Long and Prosper" - Spock
> "And let Wisdom be your Guide" - Spock's brother
>
> Ruud Schmeitz
> Universiteit Maastricht
>
Without knowing more about how the file needs to look it is a little
difficult to answer the question, but using pl/sql and the utl_file
package it should be fairly simple as long as all the data for one
parent does not have to be in one output record. If that is the case I
believe you will need pro*c.
-- Mark D. Powell -- The only advice that counts is the advice that you follow so follow your own advice -- Sent via Deja.com http://www.deja.com/ Before you buy.Received on Mon Apr 03 2000 - 15:52:06 CEST