SQL Question: duplicating Records

From: Steven C. Kondolf <stevekondolf_at_hatespam.rochestermidland.com>
Date: 2000/03/03
Message-ID: <89p1ne$6f5i$1_at_node17.cwnet.frontiernet.net>#1/1


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.

--
Received on Fri Mar 03 2000 - 00:00:00 CET

Original text of this message