<html>
<!-- BEGIN WEBMAIL STATIONERY -->
<head></head>
<body>
<!-- WEBMAIL STATIONERY noneset -->
<DIV></DIV>I would probably write some PHP to do it for me, although I'm not sure how much data you have. I'm thinking I'd itterate through the rows and check for a duplicate value by doing a select statement before doing each row insert.<BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">-------------- Original message from "Dave J. Hala Jr." <dave@58ghz.net>: -------------- <BR><BR><BR>> When using mysql 3.26 I had this function that copied records from <BR>> table1 to table2. The query in the fucntion looks like this: <BR>> <BR>> INSERT INTO table2 (field1,field2) SELECT (field1, field2) FROM table1 <BR>> WHERE field1='X' <BR>> <BR>> In table2, field1 was a primary key. If I ran the query, and tried to <BR>> insert a duplicate, mysql 3.x would just "skip" that insert and continue <BR>> on. After switching to mysql 4.x, I discovered that when 4.x encounters <BR>> a duplicate, it stops. This a problem. <BR>> <BR>> I took a wild guess and tried making field1 a "unique key" and it didn't <BR>> solve the problem. Anyone got a work around for this problem? <BR>> <BR>> <BR>> :) Dave <BR>> <BR>> -- <BR>> <BR>> Open Sour
ce Information Systems, Inc. (OSIS) <BR>> Dave J. Hala Jr., President <DAVE@OSIS.US><BR>> 641.485.1606 <BR>> <BR>> _______________________________________________ <BR>> ciapug mailing list <BR>> ciapug@cialug.org <BR>> http://cialug.org/mailman/listinfo/ciapug </BLOCKQUOTE>
<!-- END WEBMAIL STATIONERY -->
</body>
</html>