dbTalk Databases Forums  

query question

comp.database.oracle comp.database.oracle


Discuss query question in the comp.database.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kim
 
Posts: n/a

Default query question - 01-25-2004 , 12:47 PM






I tried running a query

(t1 union t2) union t3

and I get a parse error. However if I break the query down in these lines:

t4 := t1 union t2;
t4 union t3;

everything works fine. I would rather use the first query. Can anyone
explain why I can't do the first query on Oracle 9i?




-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----

Reply With Quote
  #2  
Old   
Chris Leonard
 
Posts: n/a

Default Re: query question - 02-03-2004 , 11:41 AM






Did you try it without the parentheses? If you would post a more complete
code sample, it would be easier to give you a better response.

--
Cheers,
Chris

___________________________________

Chris Leonard, The Database Guy
http://www.databaseguy.com

Brainbench MVP for Oracle Admin
http://www.brainbench.com

MCSE, MCDBA, OCP, CIW
___________________________________

"Kim" <khd000 (AT) yahoo (DOT) ca> wrote

Quote:
I tried running a query

(t1 union t2) union t3

and I get a parse error. However if I break the query down in these lines:

t4 := t1 union t2;
t4 union t3;

everything works fine. I would rather use the first query. Can anyone
explain why I can't do the first query on Oracle 9i?




-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----




Reply With Quote
  #3  
Old   
Vladimir Andreev
 
Posts: n/a

Default Re: query question - 02-04-2004 , 10:31 AM



Quote:
Did you try it without the parentheses? If you would post a more complete
code sample, it would be easier to give you a better response.
Works even *with* parentheses. So, yes, please explain your problem
better.


17:28:15 flado@ax8i>(select * from dual union select * from dual)
union select * from dual;

D
-
X

1 row selected.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.