Sybase IQ 12.6 includes expanded subquery capabilities to ease migration of Adaptive Server Enterprise applications. IQ now supports scalar subqueries (subqueries that return a single value) in two new locations:
Within the SELECT list of query or an INSERT INTO ... SELECT statement, such as:
SELECT r.x, r.y, (SELECT MAX(t.o) FROM t ... WHERE t.y = r.y), (SELECT MAX(s.o) FROM s ... WHERE s.x = r.x) FROM r WHERE ...
Within the SET clause of an UPDATE statement, for example:
UPDATE r SET r.o= (SELECT MAX(t.o) FROM t ... WHERE t.y = r.y), r.s= (SELECT SUM(x.s) FROM x ... WHERE x.x = r.x) WHERE r.a = 10
For details, see SELECT statement and UPDATE statement in the Sybase IQ Reference Manual.