Re: Why does ISQL give me a syntax error?
Posted in 1995
I sent this email to Greg Williams (gregw@gtalumni.org) last week: Date: Thu Jun 15 17:24:24 1995 From: johnl (Jonathan Leffler) To: gregw@gtalumni.org You need two sets of parentheses around the SELECT on the RHS of the SET clause. There was a doc error in the Dec 1990 manual which suggested otherwise -- is that why you were misled? Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> >From: barrye@gol.com (Barry Ewards) >Date: Mon, 19 Jun 1995 09:46:23 GMT >X-Informix-List-Id: <news.14774> > >I have just encountered a similar problem. [...details omitted...] > >This is contrary to what is in the manuals. I am running Informix 5.0 Yes -- the version 5.00 "Informix Guide to SQL: Reference" manual contains a typographical error at this point, using single parentheses instead of double parentheses. >>[...]I'm trying to use the SQL statement below, but I get a syntax error >>on the first SELECT value as part of the SET statment. [...] > >>UPDATE porder >> SET (po_recdt, po_shipdt) = (SELECT tpo_recdt, tpo_shipdt >> FROM potmp >> WHERE tpo_c_no = po_c_no AND tpo_num = po_num) >> WHERE po_c_no IN (SELECT tpo_c_no FROM potmp) >> AND po_num IN (SELECT tpo_num FROM potmp); > >>Greg Williams >>gregw@gtalumni.org