How about you show us the schema for the table so we know what is
defined as what?

Also, as the update does succeed, it would be interesting to see what
value actually got stored.  After you have accounted for each bit in
the stored value, we might have a clue about what is being truncated.

One thing I did just note: the hyphen in 'Extra-Small'.  Set
identifiers need to be valid mysql identifiers and the hyphen '-' is
not a valid identifier character (as it is an arithmatic operator).  I
can't imagine that those colons in the colour list are healthy either.

The point of a set identifier to be an easy mnemonic for a particular
bit value.  Nothing is gained by trying to represent data with the
identifier itself.

 - michael dykman


On Wed, Jan 6, 2010 at 1:25 PM, Victor Subervi <victorsube...@gmail.com> wrote:
> On Wed, Jan 6, 2010 at 2:18 PM, Hassan Schroeder <hassan.schroe...@gmail.com
>> wrote:
>
>> On Wed, Jan 6, 2010 at 11:39 AM, Victor Subervi <victorsube...@gmail.com>
>> wrote:
>>
>> > Here's my example again. Syntactically correct. From my original post:
>> >
>> > update products set SKU="prodSKU2", Category="prodCat1", Name="name2",
>> > Title="title2", Description="descr", Price="22.55", SortFactor="500",
>> > Availability="1", OutOfStock="0", Weight="5.5", ShipFlatFee="10.0",
>> > ShipPercentPrice="5", ShipPercentWeight="2", sizes="('Extra-small',
>> 'Large',
>> > 'Small', 'Medium', 'XLarge', 'XXLarge', 'XXXLarge')",
>>
>> Lose the enclosing double-quotes and put all the values within a
>> single set of single quotes.
>>
>> > colorsShadesNumbersShort="('
>> > aqua:7FFFD4', 'blue:333399', 'gray:465945', 'navy-blue:CC7722',
>> > 'black:0000FF', 'maroon:B03060', 'purple:50404D', 'yellow:9ACD32',
>> > 'fuchsia:FF77FF')"
>>
>> e.g. (shortened for lazyness):
>>
>> colorsShadesNumbersShort = ('aqua:7FFFD4, blue:333399')
>>
>> > where ID="2";
>>
>> mysql> update products set SKU="prodSKU2", Category="prodCat1",
> Name="name2", Title="title2", Description="descr", Price="22.55",
> SortFactor="500", Availability="1", OutOfStock="0", Weight="5.5",
> ShipFlatFee="10.0", ShipPercentPrice="5", ShipPercentWeight="2",
> sizes=('Extra-small, Large, Small, Medium, XLarge, XXLarge, XXXLarge'),
> colorsShadesNumbersShort=('aqua:7FFFD4, blue:333399, gray:465945,
> navy-blue:CC7722, black:0000FF, maroon:B03060, purple:50404D, yellow:9ACD32,
> fuchsia:FF77FF') where ID="2";
> Query OK, 1 row affected, 2 warnings (0.00 sec)
> Rows matched: 1  Changed: 1  Warnings: 2
>
> mysql> show warnings;
> +---------+------+---------------------------------------------------------------+
> | Level   | Code |
> Message                                                       |
> +---------+------+---------------------------------------------------------------+
> | Warning | 1265 | Data truncated for column 'sizes' at row
> 1                    |
> | Warning | 1265 | Data truncated for column 'colorsShadesNumbersShort' at
> row 1 |
> +---------+------+---------------------------------------------------------------+
> 2 rows in set (0.00 sec)
>
> Guess again.
> V
>



-- 
 - michael dykman
 - mdyk...@gmail.com

 May the Source be with you.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to