From tgl@sss.pgh.pa.us Thu Feb 3 18:03:46 2000 Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id NAA35884 for ; Thu, 3 Feb 2000 13:03:46 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id NAA28639; Thu, 3 Feb 2000 13:03:43 -0500 (EST) To: "David Warren" cc: pgsql-sql@hub.org Subject: Re: [SQL] sql statements In-reply-to: <005201bf6e80$4e97be60$0600a8c0@pams.com> References: <005201bf6e80$4e97be60$0600a8c0@pams.com> Comments: In-reply-to "David Warren" message dated "Thu, 03 Feb 2000 11:53:13 -0800" Date: Thu, 03 Feb 2000 13:03:43 -0500 Message-ID: <28636.949601023@sss.pgh.pa.us> From: Tom Lane "David Warren" writes: > UPDATE table1 SET val1 = 'test', SET val2 = 'test' WHERE recnum=1; > This statement doesn't work for me. If I use only one SET per statement = > it does. Is this supposed to be this way? Yes. I don't know where you got the idea that the SET keyword should appear multiple times, but the SQL92 syntax is perfectly clear that it appears once: ::= UPDATE SET [ WHERE ] ::= [ { }... ] ::= ::= | | DEFAULT ::= > Also, the statement INSERT INTO table1 (val1, val2, ..., val68) VALUES = > ('test','test',...,'test') gives me an error as well. There are 68 = > elements I am trying to add in that one statement. If I trim it down to = > 30 or so it is fine. Is it supposed to be this way? How long is the resulting statement? There's an 8K limit on the length of the query text in 6.5 and older releases (it's gone in current sources though). If you're not hitting that then I dunno... what error do you get exactly? regards, tom lane From exec@shreve.net Thu Feb 3 17:44:45 2000 Received: from mercury.shreve.net (IDENT:root@mercury.shreve.net [208.206.76.23]) by hub.org (8.9.3/8.9.3) with ESMTP id MAA28609 for ; Thu, 3 Feb 2000 12:44:45 -0500 (EST) (envelope-from exec@shreve.net) Received: from davwin (exec.shreve.net [208.214.45.25]) by mercury.shreve.net (8.9.3/8.9.3) with SMTP id LAA32404 for ; Thu, 3 Feb 2000 11:44:45 -0600 Message-ID: <005201bf6e80$4e97be60$0600a8c0@pams.com> From: "David Warren" To: Subject: sql statements Date: Thu, 3 Feb 2000 11:53:13 -0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_004F_01BF6E3D.40209200" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 This is a multi-part message in MIME format. ------=_NextPart_000_004F_01BF6E3D.40209200 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable UPDATE table1 SET val1 =3D 'test', SET val2 =3D 'test' WHERE recnum=3D1; This statement doesn't work for me. If I use only one SET per statement = it does. Is this supposed to be this way? Also, the statement INSERT INTO table1 (val1, val2, ..., val68) VALUES = ('test','test',...,'test') gives me an error as well. There are 68 = elements I am trying to add in that one statement. If I trim it down to = 30 or so it is fine. Is it supposed to be this way? The same statement = will load into a MySQL database without any problems at all so I know = there are no errors in the statement syntax. ------=_NextPart_000_004F_01BF6E3D.40209200 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
UPDATE table1 SET val1 =3D 'test', SET = val2 =3D 'test'=20 WHERE recnum=3D1;
This statement doesn't work for me. If = I use only=20 one SET per statement it does. Is this supposed to be this = way?
Also, the statement INSERT INTO table1 = (val1, val2,=20 ..., val68) VALUES ('test','test',...,'test') gives me an error as well. = There=20 are 68 elements I am trying to add in that one statement. If I trim it = down to=20 30 or so it is fine. Is it supposed to be this way? The same statement = will load=20 into a MySQL database without any problems at all so I know there are no = errors=20 in the statement syntax.
 
 
------=_NextPart_000_004F_01BF6E3D.40209200--