RE: data entry zero value in first column

"adrian GREEMAN" <[email protected]> Thu, 14 Sep 2006 17:03:12 +0100
Newsgroups gmane.comp.db.mysql.windows
Organization Pix and Words
Message-ID <001e01c6d817$47e141b0$8248883e@ADRIAN1>
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:[email protected]] 
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:[email protected]]
Sent: Thursday, September 14, 2006 6:13 AM
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]




-- 
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe:    http://lists.mysql.com/[email protected]