•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 374,022 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,782 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 1863 | Replies: 3
![]() |
mysql> insert into fund_history select * from temp_fund_history where data_date='2006-06-30' and index_num between 1 and 10; Query OK, 0 rows affected (0.03 sec) Records: 10 Duplicates: 10 Warnings: 0
I am really wondering why this INSERT statement is not inserting 10 records. Its saying 10 Duplicates: 10, and there is no records from index_num from 1 to 10 in fund_history table.
Can any one please help me to know the reason/cause and solution for this problem.
Thanks,
Kath
Last edited by katharnakh : Jul 17th, 2006 at 2:03 pm.
•
•
Join Date: Oct 2005
Location: Manchester, UK
Posts: 481
Reputation:
Rep Power: 3
Solved Threads: 30
•
•
•
•
Originally Posted by katharnakh
mysql> insert into fund_history select * from temp_fund_history where data_date='2006-06-30' and index_num between 1 and 10; Query OK, 0 rows affected (0.03 sec) Records: 10 Duplicates: 10 Warnings: 0
I am really wondering why this INSERT statement is not inserting 10 records. Its saying 10 Duplicates: 10, and there is no records from index_num from 1 to 10 in fund_history table.
Can any one please help me to know the reason/cause and solution for this problem.
Thanks,
Kath
do any of your fields have a unique constraint?
yes. thought so.
•
•
Join Date: Oct 2005
Location: Manchester, UK
Posts: 481
Reputation:
Rep Power: 3
Solved Threads: 30
To be honest I'm no MySQL expert (PostgreSQL fan) but it seems that MySQL has just skipped the inserts that would cause problems:
In PostgreSQL you'd get:
Query OK, 0 rows affected (0.03 sec) Records: 10 Duplicates: 10 Warnings: 0
In PostgreSQL you'd get:
ERROR: duplicate key violates unique constraint "constr_active_level_type"
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
- insert multiple rows in database (MS SQL)
- insert statement error (MySQL)
- Please Help Me, I Am to Be Fired! (ASP.NET)
- Access INSERT problem (MS Access and FileMaker Pro)
- Insert Dataset into SQL Database. (VB.NET)
- Program Problem with a select statement to access Data base (C)
Other Threads in the MySQL Forum
- Previous Thread: Upload Database
- Next Thread: 2 connections problem


Linear Mode