Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: prasanna kunder
  Where is prasanna kunder?
 mumbai
 India
 prasanna kunder
 Tags
Subject: RE: MySql Error
Thread ID: 393963 Message ID: 393974 # Views: 31 # Ratings: 1
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Friday, December 27, 2013 10:32:42 AM         
   


> >
> >
> >
> > And the error is ... ? :-)
> >
> > Your quotation marks look funny, more like a grave accent, Chr(96), rather than the expected single quote (Chr(39)).
> > Perhaps I'd try to remove them all
> >
> > ALTER TABLE maxell_data.quotation CHANGE COLUMN oldName newName VARCHAR(10) NULL DEFAULT NULL;
> > 

> >
> >
> > "Change Column" instead of the SQL standard "Alter Column" and the sameName sameName sequence also look funny to me but seem to be valid MySQl syntax according to http://dev.mysql.com/doc/refman/5.1/en/alter-table.html
> >
> >
> >
> > hth
> > -Stefan
>
>
>
> Error is
>
> Error Code: 1265. Data truncated for column 'AccCode' at row 1
>
> my code is
>
> ALTER TABLE maxell_data.quotation CHANGE COLUMN AccCode AccCode VARCHAR(10) NULL DEFAULT NULL;
>
>
> i think error in my daatype size
>
> actual table acccode in varchar(50)
> now i want make varchar(10)
>
>
> please advice me


Yes, the error code is an important info.
Looks as if you can either truncate values longer than Len(10) manually, "Update quotation Set AccCode = Left(AccCode, 10);",
or turn the MySQL server "sql_mode" to something that is not so "strict":
http://www.heidisql.com/forum.php?t=5205
http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html



hth
-Stefan

ENTIRE THREAD

MySql Error Posted by prasanna kunder @ 12/27/2013 9:21:28 AM
RE: MySql Error Posted by Stefan Wuebbe @ 12/27/2013 9:57:55 AM
RE: MySql Error Posted by prasanna kunder @ 12/27/2013 10:02:01 AM
RE: MySql Error Posted by David Mustakim @ 12/27/2013 10:11:40 AM
RE: MySql Error Posted by prasanna kunder @ 12/27/2013 10:18:11 AM
RE: MySql Error Posted by David Mustakim @ 12/27/2013 10:23:42 AM
RE: MySql Error Posted by prasanna kunder @ 12/27/2013 10:32:18 AM
RE: MySql Error Posted by David Mustakim @ 12/27/2013 10:38:25 AM
RE: MySql Error Posted by prasanna kunder @ 12/27/2013 10:46:50 AM
RE: MySql Error Posted by prasanna kunder @ 12/27/2013 10:06:52 AM
RE: MySql Error Posted by Stefan Wuebbe @ 12/27/2013 10:32:42 AM
RE: MySql Error Posted by prasanna kunder @ 12/27/2013 10:45:23 AM
RE: MySql Error Posted by Stefan Wuebbe @ 12/27/2013 11:14:59 AM