No, there is no way to trigger an insert automatically when you are doing a LOAD DATA (bulk load). You will need another flat file with the appropriate info and load that in as well...just as you have thought of. ----- Original Message ----- From: "Dion Wickander" <[EMAIL PROTECTED]> To: "MySQL Help" <[EMAIL PROTECTED]> Sent: Friday, June 07, 2002 8:12 AM Subject: newbie ? Load Data in MySQL
> I am working on a project were the customer info will be uploaded to a MySQL > database from multiple sources with a customer ID already assigned to them > and this data needs to be related to other tables with related info. OK I > have an auto increment column set up as the primary key to keep track of the > customer records that are being created and using it to relate the data to > my other tables. > > here is the question.... > > is their a built in or automated way to load data in bulk to the customer > table and with each record added to that table create a record in the other > related tables with the correct primary key? or would this need to be a > record by record individual insert to create the corresponding records. > > - my thinking is that I may have to load data in bulk, setting a flag for > the newly uploaded data. Then do a select that finds the flags and then > creating the new records in the related tables based on the found set. then > of course removing the flags after all other tables are updated. > > I was just wondering if their is a built in mechanism for something like > this? > > thanks in advance. > > > MySQL 3.23.39 > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php