RE: data entry zero value in first column
"Bonnett, John" <[email protected]> Fri, 15 Sep 2006 08:46:38 +0930
| Newsgroups | gmane.comp.db.mysql.windows |
|---|---|
| Message-ID | <[email protected]> |
You have 6 columns in your column list and only 5 entries in your value list. If I was writing that INSERT statement I would write it like this (apart from fixing that column/value count mismatch). INSERT INTO chng( IssueNo, Head, Chardate, NewDate, auth_id, PaperName ) VALUES ( 1282, 'Pleading with them is no answer to the turmoil. Society and the change is a to yet more - the only way out is entry limits. Let the "green" be an impotent endpiont raod dreamscape.', '2005-12-4', 15, 1 ) ; Hope this helps. John Bonnett -----Original Message----- From: adrian GREEMAN [mailto:[email protected]] Sent: Thursday, 14 September 2006 10:43 PM To: [email protected] Subject: data entry zero value in first column I am following through some data entry problems (thanks to those who helped me sort out an initial problem with "Load data" by the way). But some odd effects have occurred. To simplify (a complicated question I posted yesterday was obviously too much) I will ask only about the first problem: I have a temporary table set up to allow me to change date formats in one column of some data. After entering the data I read the old date column data through a transformation into another column (which remains empty at the initial data entry). I made it work previously but now it does not. The whole table begins completely empty because I delete everything from it, ready for the next use. - I have been trying to read in several columns into this table skipping the date column that gets used later by specifying the column names used. But the initial entry always comes up with the value 0 instead of the proper IssueNo value when I read in from a datafile. If I try and enter data directly with an SQL insert query I get error messages. So I pared all the data down to a single row entry and now get this error message. SQL query: INSERT INTO chng( IssueNo, Head, Chardate, NewDate, auth_id, PaperName ) VALUES ( 1282, "Pleading with them is no answer to the turmoil. Society and the change is a to yet more - the only way out is entry limits. Let the ""green"" be an impotent endpiont raod dreamscape.", 04 /12 /2005, 15, 1 ) ; MySQL said: Documentation #1136 - Column count doesn't match value count at row 1 It will not enter at all - I must have done something wrong in setting up the table. Or is there some problem in deleting everything from a table and then re-using it? The IssueNo column is specified as the primary key incidentally I hope this is clear. Many thanks Adrian -- MySQL Windows Mailing List For list archives: http://lists.mysql.com/win32 To unsubscribe: http://lists.mysql.com/[email protected]