Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Simple query not executing on Oracle

Re: Simple query not executing on Oracle

From: <ravisk12_at_my-dejanews.com>
Date: Fri, 16 Oct 1998 19:06:39 GMT
Message-ID: <7085fv$cqu$1@nnrp1.dejanews.com>


Thank you very much for your prompt and usefull response.. Actually we have a situation where there are two tables with same names on different databases, and we need to execute a single query accessing both of these tables..

to be precise ..the query would be lets say database1 is on Oracle on NT server and database2 is personal oracle on my WINDOWS 95 machine.

select * from ':database1:XYZTable' a, ':database2:XYZTable' b where a.fld1 = b.fld1

How could we handle this kind of situation in oracle by the syntax mentioned in your response..

Thanks once again for all your help..
-Ravi

>
> In the beginning there was Codd. And he said "Let there be SQL" and there
> was. He looked at it and it was a Good Thing (tm).
>
> To cut a long and interesting story short, then came the database vendors
> and raped and plundered it... :-)
>
> Seriously though, SQL implementations are not the same. Vendors do their own
> things (no real surprises there). For Oracle, drop the quotes (not
> necessary) from your SQL and replace DATABASE1 with the name of the schema
> (i.e.. Oracle user) and use a colon to separate the name of the TABLE with
> the name of the SCHEMA.
>
> Example:
> SELECT * FROM SCOTT.CLIENTS
>
> There's a kind of vanilla flavour of SQL. The basic set of ANSI SQL '92
> standards - minimum conformance I think they call it. If you stick to that
> then your stuff should work against most SQL db platforms.
>
> Oracle SQL has the vanilla flavour, but the chocolate and strawberry flavour
> is much better. Oracle supplies you with a lot of additional (non-standard
> of course) SQL extensions that are very powerful. Even to the extend that
> you can implement IF THEN ELSE type logic in the SELECT part of the SQL
> statement. Extremely useful when handling VLDBs or VLTBs where you can not
> resort to the slow cursor based processing.
>
> enjoy the ice-cream!
> Billy
>
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Oct 16 1998 - 14:06:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US