On Wed, Jan 6, 2010 at 10:56 AM, Michael Dykman <mdyk...@gmail.com> wrote:

> I don't really use sets when I can avoid them (too much special
> wierdness) but from the manual I see this:
>
> mysql> INSERT INTO myset (col) VALUES
> -> ('a,d'), ('d,a'), ('a,d,a'), ('a,d,d'), ('d,a,d');
> Query OK, 5 rows affected (0.01 sec)
>
> mysql> SELECT col FROM myset;
> +------+
> | col  |
> +------+
> | a,d  |
> | a,d  |
> | a,d  |
> | a,d  |
> | a,d  |
> +------+
>
> which suggests your syntax is in error.  It appears that it should be:
>
> 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";
>
> watch for the line-wraps in the SET data specifications..  I did both
> of your sets (I assume colorsShadesNumbersShort is a set.. I don't
> know what you are trying to do there.
>

No, that thew the same errors. I know you have to enclose the sets in
parentheses and individually quote each element.
V

>
>  - michael dykman
>
> On Wed, Jan 6, 2010 at 9:32 AM, Victor Subervi <victorsube...@gmail.com>
> wrote:
> > On Wed, Jan 6, 2010 at 10:23 AM, Michael Dykman <mdyk...@gmail.com>
> wrote:
> >>
> >> What are the warnings?
> >>
> >> 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 |
> >
> +---------+------+---------------------------------------------------------------+
> >
> >>
> >>
> >> On Wed, Jan 6, 2010 at 9:04 AM, Victor Subervi <victorsube...@gmail.com
> >
> >> wrote:
> >> > Hi;
> >> > The following doesn't work with or without enclosing the sets in
> quotes:
> >> >
> >> > 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";
> >> >
> >> > Everything inserts but the sets which throw warnings. What am I
> missing?
> >> > TIA,
> >> > Victor
> >> >
> >> > --
> >> > The Logos has come to bear
> >> > http://logos.13gems.com/
> >> >
> >>
> >>
> >>
> >> --
> >>  - michael dykman
> >>  - mdyk...@gmail.com
> >>
> >>  May the Source be with you.
> >
> >
> >
> > --
> > The Logos has come to bear
> > http://logos.13gems.com/
> >
>
>
>
> --
>  - michael dykman
>  - mdyk...@gmail.com
>
>  May the Source be with you.
>



-- 
The Logos has come to bear
http://logos.13gems.com/

Reply via email to