data entry zero value in first column

data entry zero value in first column

am 14.09.2006 15:13:02 von Adrian Greeman

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/win32?unsub=gcdmw-win32@m.gmane.org

RE: data entry zero value in first column

am 14.09.2006 18:03:12 von Adrian Greeman

Thanks. I know about the date format - it is to change that, that I am using
a temporary table - I read into a text column and then copy it out with a
few manipulations to get it the right way round into another column.
So it goes into a char column and actually for most of the data this seems
not to be a problems

Incidentally I notice that phpMyAdmin uses those quotes - how do you get
them?

But I don't think that is the issue either

I have loaded a data file with 30 rows and 26 of them went in OK

the first one causes this nought entry problem and three others are OK for
the issue number, and the text but the other columns come up empty

This seems to reflect 2 different problems but they might be linked.

Could it be to do with the character set I am trying to use UTC8 is
specified for the MySQL but I am not sure what is in the text file and if it
is the same?




Regards
Adrian

Pics and Words
0780 329 7447
020 8672 9661

-----Original Message-----
From: John Theroux [mailto:john@northerninnovators.com]
Sent: 14 September 2006 15:49
To: adrian GREEMAN
Subject: RE: data entry zero value in first column


date format looks wrong. Also MySQL allows you to use `single quotes` around

text `and` dates as so: `2006-10-31` (note slope of `` quote)

hope this helps

john




-----Original Message-----
From: adrian GREEMAN [mailto:adriangreeman@pixandwords.freeserve.co.uk]
Sent: Thursday, September 14, 2006 6:13 AM
To: win32@lists.mysql.com
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/win32?unsub=john@northerninnovators.c om




--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

RE: data entry zero value in first column

am 15.09.2006 01:16:38 von John.Bonnett

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:adriangreeman@pixandwords.freeserve.co.uk]=20
Sent: Thursday, 14 September 2006 10:43 PM
To: win32@lists.mysql.com
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.=20

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.=20

- 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.=20

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.=20

SQL query: =20

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=20


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/win32?unsub=3Dgcdmw-win32@m.gmane.org