This is a discussion on Re: union subqueries in within the Informix forums, part of the Database Server Software category; --> Try: select * from table( multiset( select * from <your-table> ) ) ; -----Original Message----- From: "Dan" <bubba@dekworld.com> To: ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Try: select * from table( multiset( select * from <your-table> ) ) ; -----Original Message----- From: "Dan" <bubba@dekworld.com> To: informix-list@iiug.org Date: Fri, 13 May 2005 10:34:44 -0400 Subject: union subqueries in "from" clause (IDS 9.4) Hi. The SQL Syntax Guide claims that the subject queries are supported. (Ref: http://publib.boulder.ibm.com/infoce...oc/sqls697.htm) E.g. for a simple table like... CREATE TABLE utest ( q INTEGER NOT NULL, w CHAR(1) NOT NULL, v INTEGER NOT NULL, PRIMARY KEY (q,w) ); ....I would expect that the following would work select q, sum(v) from (select q,v from utest where w='a' union all select q,v from utest where w='b') group by q; But instead it produces a "syntax error" pointing to the 2nd "v" (from the left, column 32). Any ideas on why I can't get this to work? Jean Sagi jeansagi@myrealbox.com jeansagi@gmail.com sending to informix-list |
| Thread Tools | |
| Display Modes | |
|
|