3 tables involved:  Products (details about the tire in this case), 
Locations (store locations), and Inventory (contains FKs to both 
Products and Locations and has current count in stock of Product at 
Location).

I want to create an Insert trigger on Products that automatically 
creates an Inventory record for EACH record in the Location table.  For 
example, if I create a Product with PK=44, and there are 3 records in 
the Locations table (PKs = 1, 2, and 3), then I want 3 records inserted 
into the Inventory table, with the keys 44/1, 44/2, and 44/3.

Does anyone know a way to get a "recordset" from the Locations table 
inside the stored proc and then cycle through it creating these records 
for the new Product ID?  I knew how to do this in PL/SQL (Oracle 9), but 
MySQL is new territory for me.

tia!
--Michael



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to