So far, you created the Jigsaw Puzzles database and loaded a list of puzzles manufacturers. It's time to start loading information about the products you will sell— puzzles.
Suppose, in order to show you what they are selling, the suppliers provide you with the lists of products made by the manufacturers themselves. Fortunately, they don't give you the lists in the form of papers, but they give you either plain files or spreadsheets. In this tutorial, you will take the list of products offered by the manufacturer Classic DeLuxe and load it into the puzzles table.
productlist_LUX_200908.txt
file.Pay attention to the each
field. It's the price of the product and must be configured as a Number
with format $0.00
.
productlist_LUX_200908.txt
by ${PRODUCTLISTFILE}
. String
constant named man_code
with value LUX
. js
as Connection. As Target table, browse and select products. In the upper grid of the window, add the conditions pro_code = prodcod
and man_code = man_code
. Click the Edit mapping button. The mapping dialog window shows up. prodcod
, under the Target fields list click on pro_code
, and then click the Add button. Again, under the Source fields list click on title
, under the Target fields list click on pro_name
, and then finally click Add. Proceed with the mapping until you get the following: Update
column for the price row with the value Y
. Fill the rest of the column with the value N
. The following is how the final grid looks like: PRODUCTLISTFILE
variable with the value productlist_LUX_200908.txt
.SELECT * FROM products p;
You populated the products table with data found in text files. For inserting the data, you used the Insert/Update step.
As this was the first time you dealt with the products table, before you ran the transformation, the table was empty. After running the transformation, you could see how all products in the file were inserted in the table.
3.149.249.211