4 Replies Latest reply: Oct 22, 2014 7:23 AM by christian juillard RSS

    Autogenerate an ID (between 1 - 30) for already existing 16384 records

      I'm trying to autogenerate an ID for a set of already existing records.

       

      Let me explain: I've two tables, namely, Shipments and Suppliers. The "SupplierID" in Suppliers table is having a column with values from like 1 - 30. Now I want to add a column called "SupplierID" in Shipments table as well, which is containing records of some 16300+.. So obviously the "SupplierID" values should repeat between 1- 30 for all those 16300+ rows..

       

      I am trying to find out a method to do this, using a for loop or something in order to auto generate the "SupplierID" in the Shipments table for each of its rows.

       

      LOAD

      <I want to loop this column using 'for' loop from 1-30 values for the 16300+ rows in Shipments table>

      SUPPLIER ID autogenerate,

      CustomerID,

      OrderDate,

      OrderID,

      Cost,

      Customer,

      Product,

      ProductID

       

      FROM

      [C:/blahblahblah/Shipments.xls]

      (biff, embedded labels, table is Shipments$)

       

       

      HELP!!