From oracle-l-bounce@freelists.org Wed Jun 16 16:24:20 2004 Return-Path: Received: from air189.startdedicated.com (root@localhost) by orafaq.com (8.11.6/8.11.6) with ESMTP id i5GLNoT26458 for ; Wed, 16 Jun 2004 16:24:00 -0500 X-ClientAddr: 206.53.239.180 Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180]) by air189.startdedicated.com (8.11.6/8.11.6) with ESMTP id i5GLNe626428 for ; Wed, 16 Jun 2004 16:23:50 -0500 Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 49D2972C3CC; Wed, 16 Jun 2004 16:08:12 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 13039-37; Wed, 16 Jun 2004 16:08:12 -0500 (EST) Received: from turing (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 3469772C039; Wed, 16 Jun 2004 16:08:11 -0500 (EST) Received: with ECARTIS (v1.0.0; list oracle-l); Wed, 16 Jun 2004 16:06:49 -0500 (EST) X-Original-To: oracle-l@freelists.org Delivered-To: oracle-l@freelists.org Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 72FB072C138 for ; Wed, 16 Jun 2004 16:06:48 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10594-94 for ; Wed, 16 Jun 2004 16:06:48 -0500 (EST) Received: from ppoone1.ppoone.com (ppoone1.ppoone.com [66.54.156.196]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id DAC5872C1AB for ; Wed, 16 Jun 2004 16:06:47 -0500 (EST) Received: by ppoone1.ppoone.com with Internet Mail Service (5.5.2653.19) id ; Wed, 16 Jun 2004 16:25:21 -0500 Message-ID: From: Kevin Lange To: "'oracle-l@freelists.org'" Subject: SQL Loader Question on 8.1.7 Date: Wed, 16 Jun 2004 16:25:21 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Virus-Scanned: by amavisd-new at freelists.org X-archive-position: 2846 X-ecartis-version: Ecartis v1.0.0 Sender: oracle-l-bounce@freelists.org Errors-To: oracle-l-bounce@freelists.org X-original-sender: klange@ppoone.com Precedence: normal Reply-To: oracle-l@freelists.org X-list: oracle-l X-Virus-Scanned: by amavisd-new at freelists.org Evening; I figured if anyone would know ... you all would. Here is a simple example given in the Oracle SQLLDR manual: You have conditional data in a singl file to be loaded into different tables: 1 50 Manufacturing 2 1100 Smith 2 1200 Snyder 1 60 Shipping 2 1121 Stevens Based on the Record ID, you want either the Department or the Employee table to be loaded: Into Table dept When recid = 1 (recid Position(1:1) Integer External, deptno Position(3:4) Integer External, depname Position(8:21) Char) Into Table emp When recid = 2 (recid Position(1:1) Integer External, empno Position(3:6) Integer External, empname Position(8:17) Char commission Position(19:25)) That is fairly simple. It gets more difficult when you ask the question .... Can you carry the data from one of the When sections over into another section ?? i.e. Is there a way to make a presistant variable that is set in one section and then used in another section ?? Using the sample above, we need to have the "Department Number" (depno) inserted into the EMP table without having to add it to each individual record where recid = 2 since it is already on the record where recid = 1. Any help or direction to go for samples if possible would be greatly appreciated. Kevin ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request@freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------