EXIST, UNION not documented?

Post Reply
marc10
Posts: 2
Joined: Fri Mar 09, 2001 3:39 pm

EXIST, UNION not documented?

Post by marc10 »

The intro to Ch 7 'Advanced Queries' says:
...
The final section introduces several advanced query
techniques, including ... subqueries using the
EXIST operator, and combining query results using
the UNION operator.

Um, where is this info? It's not in Ch 7 or any Ch or manual as far as I can tell.
(Also there are a fair number of Texis reserved words
listed in Ch 12 that are not documented anywhere.)

Am I missing something?

I tried using a UNION between 2 selects and it seems to work same as Oracle, it would just be nice to know about this. Perhaps its unsupported? Can I assume EXIST is the same story?
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

EXIST, UNION not documented?

Post by John »

It appears that those sections of the manual were missed. UNION is supported, although it works more like Oracle's UNION ALL in that it does not do duplicate removal. EXISTS is also supported and should work as expected.
John Turnbull
Thunderstone Software
marc10
Posts: 2
Joined: Fri Mar 09, 2001 3:39 pm

EXIST, UNION not documented?

Post by marc10 »

OK, can I do a UNION within a subquery:

select id from table where id in
(select id from ... where ...
UNION
select id from ... where ...)

I keep getting error:
syntax error at "UNION"

thanks
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

EXIST, UNION not documented?

Post by John »

No, a subquery can only be a single simple SELECT. Is that not the same as:

select id from table where id in (select id from ...)
UNION
select id from table where id in (select id from ...)
John Turnbull
Thunderstone Software
Post Reply