As indicated earlier in one of my responses, INSERT... SELECT will allow you to grab a subset from one table and put in the other. You can also use the WHERE clause to apply conditions to your subset.
Aman Raheja http://www.techquotes.com On Wed, 2004-07-21 at 11:22, bruce wrote: > andrew... > > thanks for the response... load_data looks reasonable, however, it appears > that it won't be applicable for my situation. > > i have a table with 5-6 items in each row. the table that i want to insert > the data into, needs to have a subset of these items in each row... > > there doesn't appear to be any way to take a subset of the column > information within the input file. i suppose i could create a temp table, > load everything from the input file into the temp table, do a select from > the temp table, loading the target table with the requisite information, and > then delete the temp table... > > any thoughts... > > -bruce > > > -----Original Message----- > From: Andrew Hill [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 21, 2004 8:51 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: insertion of multiple rows > > > Hi Bruce, > > You might be interested in the LOAD DATA INFILE syntax. See > http://dev.mysql.com/doc/mysql/en/LOAD_DATA.html. > > The command can either be used to replace duplicate records on unique > keys, or can ignore them. > > Cheers, > > -- > Andrew Hill > Developer > Awarez Ltd. > Kirkman House, 12-14 Whitfield Street, London W1T 2RF > T: +44 (0)20 7299 7370 F: +44 (0)20 7299 7374 > > ---------------------------------------------------------------------- > The information in this email is confidential and is intended solely > for the addressee. It may be legally privileged. The contents are not > to be disclosed to anyone other than the addressee and access to this > email by anyone else is unauthorised. > Unauthorised recipients are requested to preserve the confidentiality > of this email and to advise the sender immediately of any error in > transmission. Any disclosure, copying, distribution or action taken or > omitted to be taken in reliance upon the contents of this email by > unauthorised recipients is prohibited and may be unlawful. > ---------------------------------------------------------------------- > > > -----Original Message----- > > From: bruce [mailto:[EMAIL PROTECTED] > > Sent: 21 July 2004 16:36 > > To: [EMAIL PROTECTED] > > Subject: insertion of multiple rows > > > > hi... > > > > quick question that i can't find an answer to. i have 500-100 > > rows of data that need to be inserted. i can do it a row at a time. > > > > is there a way i can do the inserts all at one time, reducing > > the hits on the database?? and if i can do the inserts all at > > once, how do i handle possible duplicates if i have specified > > in the tbl design that the element should be unique? would > > the insert bomb or continue??? > > > > thanks > > > > -bruce > > > > > > > > -- > > MySQL General Mailing List > > For list archives: http://lists.mysql.com/mysql > > To unsubscribe: > > http://lists.mysql.com/[EMAIL PROTECTED] > > > > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]