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: Converting one record into many

Re: Converting one record into many

From: Carlos <miotromailcarlos_at_netscape.net>
Date: 8 Apr 2005 00:42:56 -0700
Message-ID: <1112946176.540671.240640@g14g2000cwa.googlegroups.com>


>>In order to print labels for all the items received I need to convert
every record in this table in as many record indicates.

Do you really want to STORE the labels you print?

In PL/SQL:

FOR rec_Receipt in (SELECT PO_ID, PO_LINE_ID, ITEM_ID, LOC_ID, QUANTITY FROM Receipt )
LOOP
   FOR i IN 1..rec_Receipt.QUANTITY LOOP

      INSERT INTO LABELS(ITEM_ID, LOC_ID, ...) VALUES (ITEM_ID, LOC_ID, ...);

   END LOOP;
END LOOP; Saludos.

Carlos. Received on Fri Apr 08 2005 - 02:42:56 CDT

Original text of this message

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