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: how to query between 2 remote databases

Re: how to query between 2 remote databases

From: kiran <kiran.news.invalid_at_web2news.net>
Date: Wed, 02 Jul 2003 19:21:26 +0200
Message-ID: <47113N086@web2news.com>


Oracle version we have is 8.1.6

TurkBear wrote:
> The oracle error details are:
>



-
> ORA-00933 SQL command not properly ended
>
> Cause: The SQL statement ends with an inappropriate
> clause. For example, an ORDER BY clause may have
> CREATE VIEW or INSERT statement. ORDER BY cannot be used
> to create an ordered view or to insert in a
> improper SQL ending occurs if IN clause is used with only
> one argument (IN(X), for example). An IN c
> more arguments.
>
> Action: Correct the syntax by removing the inappropriate
> clauses. It may be possible to duplicate th
> another SQL statement. For example, to order the rows of a
> view, do so when querying the view and no
> error can also occur in SQL*Forms applications if a
> continuation line is indented. Check for indente
> spaces.
>
>



>
> I suspect it is in the use of the user/pass combo with the
> database link name..
> Try recreating the links with the usual
> create database link link_name1 ( depends on global_name
> setting on remote database) connect to us
> using 'db1.world' ( assumes tnsnames.ora entry by that name)
>
> create database link link_name2 ( depends on global_name
> setting on remote database) connect to us
> using 'db2.world' ( assumes tnsnames.ora entry by that name)
>
> Then:
> select * from
> tbl1_at_link_name1 a,tb2_at_link_name2 b
> where a.col1 = b.col1;
>
> should work..
>
> BTW, what Oracle version ( it can make a difference)
>
> "kiran" <kiran.news.invalid_at_web2news.net> wrote:
>
>>The error I get is:
>>
>>SQL> !oerr ora 00933
>>00933, 00000, "SQL command not properly ended"
>>
>>The OS is HP/UX 9000
>>
>>TurkBear wrote:
>>> "kiran" <kiran.news.invalid_at_web2news.net> wrote:
>>>
>>>>How to query on two tables that are on two different
>>>> remote database
>>>>with a join.
>>>>
>>>> s *
>>>> f tb1_at_uid/pass_at_db1.world a, tb2_at_uid/pass_at_db2.world b
>>>> w a.col1 = b.col2
>>>>
>>>>but this does not work, any idea ?
>>>>
>>>>Thanks
>>> Does not work, how?
>>>
>>> Also OS, version, etc would be a nice touch..
-- 
Direct access to this group with http://web2news.com
http://web2news.com/?comp.databases.oracle.server
Received on Wed Jul 02 2003 - 12:21:26 CDT

Original text of this message

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