Quantcast
Channel: Toad for MySQL
Viewing all articles
Browse latest Browse all 1315

Forum Post: Rows inserted count , rows updated count is incorrect

$
0
0
I am a software engineer who has just started working with msql (and Toad) after a 20 year layoff.  I am rusty and confused.  I know what rtfm means; however, this is a condrum I have not been able to solve I run the following insert from a select.  The files are essentially flat files, ymtest has a key of  username,   ram2012 is an import of a spreadsheet by way of excel to access to odbc to mysql.  There is no mysql key defined; however, the ID field , which is unique, is carried over from access and it goes from1 to 233   I can run this repeatedly, it says 464 rows affected.  phpMYadmin says 464 rows inserted.   At best, I can only see how 233 rows could be affected.  How do I turn on logging or whatever so that I can track the records being updated, inserted or whatever?   Is this a debug process? A select count of the input file gives: select count(*) from ram2012;  gives 233 rows The select in the insert returns 232 rows. INSERT INTO ymtest ( MemberTypeCode, PrimaryGroupCode, ConstituentID, Registrationdate, DateMembershipExpires, EmployerName, EmployerAddressLines, EmployerCity, EmployerLocation, EmployerPostalCode, EmployerPhoneAreaCode, EmployerPhone, EmployerFaxAreaCode, EmployerFax, Membership, LastName, FirstName, Nickname, ProfessionalTitle, EmailAddress, Username, Password, AnnualE ) SELECT ymdistinct.MemberTypeCode, ymdistinct.PrimaryGroupCode, ymdistinct.ConstituentID, ymdistinct.Registrationdate, ymdistinct.DateMembershipExpires, ymdistinct.EmployerName, ymdistinct.EmployerAddressLines, ymdistinct.EmployerCity, ymdistinct.EmployerLocation, ymdistinct.EmployerPostalCode, ymdistinct.EmployerPhoneAreaCode, ymdistinct.EmployerPhone, ymdistinct.EmployerFaxAreaCode, ymdistinct.EmployerFax, ymdistinct.Membership, ram2012.`LNAME1`, ram2012.`FNAME1`, ram2012.`FNAME1` as NickName, ram2012.`TITLE1`, ram2012.`E-MAIL`, getUserName(ymdistinct.ConstituentID, FNAME1, LNAME1) AS USERNAME, getUserPasswrd(ymdistinct.ConstituentID, FNAME1, LNAME1) AS PASSWORD, '2'  as AnnualE FROM ram2012 JOIN YMDistinct on ram2012.shortcode = YMDistinct.ConstituentID WHERE LNAME1 is not null ON DUPLICATE KEY UPDATE ymtest.AnnualE= ymtest.ANNUAlE + '2';

Viewing all articles
Browse latest Browse all 1315

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>