From: Michael Dykman Date: January 6 2010 4:14pm Subject: Re: Another Inserting Multiple Values with Set Problem List-Archive: http://lists.mysql.com/mysql/220104 Message-Id: <814b9a821001060814s5e67312je906486dd293bb6c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable so you dropped the quotes around the unneccessarily bracketed expression? It's hard to diagnose when your example isn't even what you think is syntactically correct. I can't find a reference, but i recall there is some limit on the length of SET member identifiers.. some of yours look longish, maybe? - md On Wed, Jan 6, 2010 at 10:53 AM, Victor Subervi w= rote: > On Wed, Jan 6, 2010 at 10:56 AM, Michael Dykman 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 =A0| >> +------+ >> | a,d =A0| >> | a,d =A0| >> | a,d =A0| >> | a,d =A0| >> | a,d =A0| >> +------+ >> >> which suggests your syntax is in error. =A0It appears that it should be: >> >> update products set >> =A0SKU=3D"prodSKU2", >> =A0Category=3D"prodCat1", >> =A0Name=3D"name2", >> =A0Title=3D"title2", >> =A0Description=3D"descr", >> =A0Price=3D"22.55", >> =A0SortFactor=3D"500", >> =A0Availability=3D"1", >> =A0OutOfStock=3D"0", >> =A0Weight=3D"5.5", >> =A0ShipFlatFee=3D"10.0", >> =A0ShipPercentPrice=3D"5", >> =A0ShipPercentWeight=3D"2", >> =A0sizes=3D 'Extra-small, Large, Small, Medium, XLarge, XXLarge, XXXLarg= e', >> =A0colorsShadesNumbersShort=3D'aqua:7FFFD4, blue:333399, gray:465945, >> navy-blue:CC7722, black:0000FF, maroon:B03060, >> purple:50404D,yellow:9ACD32, fuchsia:FF77FF' >> where ID=3D"2"; >> >> watch for the line-wraps in the SET data specifications.. =A0I 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 > >> >> =A0- michael dykman >> >> On Wed, Jan 6, 2010 at 9:32 AM, Victor Subervi >> wrote: >> > On Wed, Jan 6, 2010 at 10:23 AM, Michael Dykman >> wrote: >> >> >> >> What are the warnings? >> >> >> >> mysql> show warnings; >> > >> > >> +---------+------+------------------------------------------------------= ---------+ >> > | Level =A0 | Code | >> > Message =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | >> > >> +---------+------+------------------------------------------------------= ---------+ >> > | Warning | 1265 | Data truncated for column 'sizes' at row >> > 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| >> > | Warning | 1265 | Data truncated for column 'colorsShadesNumbersShort= ' >> at >> > row 1 | >> > >> +---------+------+------------------------------------------------------= ---------+ >> > >> >> >> >> >> >> On Wed, Jan 6, 2010 at 9:04 AM, Victor Subervi > > >> >> wrote: >> >> > Hi; >> >> > The following doesn't work with or without enclosing the sets in >> quotes: >> >> > >> >> > update products set SKU=3D"prodSKU2", Category=3D"prodCat1", Name= =3D"name2", >> >> > Title=3D"title2", Description=3D"descr", Price=3D"22.55", SortFacto= r=3D"500", >> >> > Availability=3D"1", OutOfStock=3D"0", Weight=3D"5.5", ShipFlatFee= =3D"10.0", >> >> > ShipPercentPrice=3D"5", ShipPercentWeight=3D"2", sizes=3D"('Extra-s= mall', >> >> > 'Large', >> >> > 'Small', 'Medium', 'XLarge', 'XXLarge', 'XXXLarge')", >> >> > colorsShadesNumbersShort=3D"('aqua:7FFFD4', 'blue:333399', >> 'gray:465945', >> >> > 'navy-blue:CC7722', 'black:0000FF', 'maroon:B03060', 'purple:50404D= ', >> >> > 'yellow:9ACD32', 'fuchsia:FF77FF')" where ID=3D"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/ >> >> > >> >> >> >> >> >> >> >> -- >> >> =A0- michael dykman >> >> =A0- mdykman@stripped >> >> >> >> =A0May the Source be with you. >> > >> > >> > >> > -- >> > The Logos has come to bear >> > http://logos.13gems.com/ >> > >> >> >> >> -- >> =A0- michael dykman >> =A0- mdykman@stripped >> >> =A0May the Source be with you. >> > > > > -- > The Logos has come to bear > http://logos.13gems.com/ > --=20 - michael dykman - mdykman@stripped May the Source be with you.