From: "Steven C. Kondolf" <stevekondolf@hatespam.rochestermidland.com>
Subject: SQL Question: duplicating Records
Date: 2000/03/03
Message-ID: <89p1ne$6f5i$1@node17.cwnet.frontiernet.net>#1/1
Sender: UNKNOWN@38.151.195.2
X-Trace: node17.cwnet.frontiernet.net 952109614 212146 38.151.195.2 (3 Mar 2000 18:53:34 GMT)
Organization: Rochester Midland Corp
X-MSMail-Priority: Normal
X-Priority: 3
NNTP-Posting-Date: 3 Mar 2000 18:53:34 GMT
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Newsgroups: comp.databases.oracle.misc,comp.databases.oracle.tools
X-Complaints-To: abuse@frontiernet.net


Hi All -

I have been asked to generate labels for products in our inventory based on
the number of containers in stock.  For example, if I have 8 pails of
product A, I need 8 labels.  25 bbls of B, 25 labels, etc.  My plan is to
somehow generate duplicate records, one for each package for each item in
our inventory.  So product A would have 8 duplicated records, B would have
25, etc.  I can then feed this into Oracle Reports and replicate the labels.

I have tables with the product information and another with the inventory
information.  Is there a way thru sql to accomplish this or do I have to
write some sort of plsql script to do this.  My thought was to create a
temporary table and write some sort of plsql loop for each item and insert
into the temp table during each loop.

Is there an easier way???  I'm pretty new to writing sql code.  Thanks.

--





