Heterogenous Queries
Posted in 2009
Topics: Connectivity: ODBC / JDBC / .NET
I have to perform a heterogenous query over two databases from the same IDS
using the informix ODBC-Driver and Delphi 5 IDE. The versions are 9.6 for
Informix server and ODBC-driver 2.900.
I placed two database components with connections to the two databases. The
following statement in the query component doesn't work:
select * from ":database1:table1" a, ":Database2:table2 b
where (a.key1=b.key2
Errormessage was -201.
Can anybody help?
kind regards
Wolfgang
Hi Wolfgang,
Error message -201 is a syntax error
try
Select *
from database1:table1 a, database2:table2 b
Where a.key1=b.key2
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
WOLFGANG HIRSCH
Sent: 24 February 2009 05:01 PM
To: ids@iiug.org
Subject: Heterogenous Queries [14994]
I have to perform a heterogenous query over two databases from the same IDS
using the informix ODBC-Driver and Delphi 5 IDE. The versions are 9.6 for
Informix server and ODBC-driver 2.900.
I placed two database components with connections to the two databases. The
following statement in the query component doesn't work:
select * from ":database1:table1" a, ":Database2:table2 b
where (a.key1=b.key2
Errormessage was -201.
Can anybody help?
kind regards
Wolfgang
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
==================
Please read our Email Disclaimer :
http://www.thefuelgroup.com/disclaimer.html
Wolfgang:
You got a syntax error. Lose the quotes and the lead colon character. The
general format for a database reference is:
<databasename><@servername>:<tablename>.<columname>
You use whatever portion of that you need. So for a common local table
reference to a connected database in the FROM clause of a query you'd just
need <tablename>. So, try:
select * from database1:table1 a, Database2:table2 b
where (a.key1=b.key2 ....
Art
On Tue, Feb 24, 2009 at 10:00 AM, WOLFGANG HIRSCH <w.hirsch@vzfb.de> wrote:
> I have to perform a heterogenous query over two databases from the same IDS
> using the informix ODBC-Driver and Delphi 5 IDE. The versions are 9.6 for
> Informix server and ODBC-driver 2.900.
>
> I placed two database components with connections to the two databases. The
> following statement in the query component doesn't work:
>
> select * from ":database1:table1" a, ":Database2:table2 b>
> where (a.key1=b.key2
>
> Errormessage was -201.
>
> Can anybody help?
>
> kind regards
>
> Wolfgang
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
--0016368325980182b30463abe724