QL to reproduce the problem.
#
# Running mysql 5.0.41
#
CREATE TABLE test (
id int(10) unsigned NOT NULL auto_increment,
name varchar(255) default NULL,
PRIMARY KEY (id)
) CHARSET=utf8 ENGINE=MyISAM;
# Note the trailing spaces in the name.
INSERT INTO test( id, name ) VALUES( 1,
.0.41
#
CREATE TABLE test (
id int(10) unsigned NOT NULL auto_increment,
name varchar(255) default NULL,
PRIMARY KEY (id)
) CHARSET=utf8 ENGINE=MyISAM;
# Note the trailing spaces in the name.
INSERT INTO test( id, name ) VALUES( 1, 'TEST ' );
# Note there are no trailing spa
At 15:39 -0400 9/3/05, Jason Pyeron wrote:
I have found out that some files on the system, have trailing spaces...
To make matters worse I have found 'file ' and 'file ' both exist,
breaking constraint "name".
So am I better off going to TINYTEXT or VAR
I have found out that some files on the system, have trailing spaces...
To make matters worse I have found 'file ' and 'file ' both
exist, breaking constraint "name".
So am I better off going to TINYTEXT or VARBINARY(255) for the name field?
That said anothe
UPDATE my_table
SET my_column = TRIM(my_column),
my_other_column = TRIM(my_other_column)
etc...
Dave Merrill
> Is it possible to remove all trailing and leading spaces for selected
> fields once the data has already been loaded?
>
> Steve
--
MySQL General Mailing List
For list archives: h
Is it possible to remove all trailing and leading spaces for selected
fields once the data has already been loaded?
Steve
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Hi,
I'm just trying to make sure I am going about this the right way.
I have a group of String IDs , strings up to 31 characters long,
case-insensitive, trailing spaces allowed. I've got these IDs in their
own table, to specifiy a numerical ID.
So I have a numerical ID and a Stri
I had created a table and started populating it, but did not get to
certain fields until later.
When I tried to do an insert it would not go. It was not reconizing 2
fields. I read and re-read the statement etc. Tried it from phpMyAdmin,
command line and my php script.
Anyways, I removed one f
I am using 4.0.18. I also checked out the "Bugs Fixed" report--and it kind
of looks like #2295 applies, although I can't be certain. It definitely
returns rows without trailing spaces, even though the SELECT asks for rows
WITH trailing spaces.
Hmmm...
on 5/2/04 2:05 AM, M
Hi John,
What version do you use? In 4.0.18, they fixed some bugs that were
introduced in 4.0.17 related to trailing spaces on indexed TEXT-family
columns: http://dev.mysql.com/doc/mysql/en/News-4.0.18.html
I see 3 "Bugs fixed" entries with "trailing spaces" in them. If you
>If the string is theString + space and another row has an entry with
>theString (+ no space), the query returns BOTH rows.
>
>Is there a way to get around returning the latter entry?
You could do something like:
select stuff from mytable where stuff = 'foo ' and length(stuff) = 4;
--
Steve Ba
John Mistler wrote:
The TINYTEXT format solves the problem of storing the string with spaces at
the end. Now, I'm having trouble SELECTING a row WHERE the TINYTEXTcolumn =
theStringWithTheSpacesAtTheEnd;
If the string is theString + space and another row has an entry with
theString (+ no space),
The TINYTEXT format solves the problem of storing the string with spaces at
the end. Now, I'm having trouble SELECTING a row WHERE the TINYTEXTcolumn =
theStringWithTheSpacesAtTheEnd;
If the string is theString + space and another row has an entry with
theString (+ no space), the query returns BO
13 matches
Mail list logo