473,480 Members | 3,135 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

as400 join sqlserver...

hi

I have an AS400 table and SQL server table and need do a JOIN in a
select, I did this:

SELECT GNORP.COORG, GNORG.ORDES, GNORP.CPAIS, GNPAI.PADES, GNORP.ORV01
FROM ((GNORP GNORP LEFT OUTER JOIN GNORG GNORG ON GNORP.COORG =
GNORG.COORG) LEFT OUTER JOIN SERVIDOR_CBL.GN_3_0.dbo.GNPAI GNPAI ON
GNORP.CPAIS = GNPAI.COPAI) ORDER BY GNORP.COORG, GNORP.CPAIS

in this case "SERVIDOR_CBL.GN_3_0.dbo.GNPAI" I said the
serverName.BDName.Owner.TableName

But give me an error... Anyone know how can I do this??

Thanks in advance...
Nov 12 '05 #1
2 3783
nuria wrote:
hi

I have an AS400 table and SQL server table and need do a JOIN in a
select, I did this:

SELECT GNORP.COORG, GNORG.ORDES, GNORP.CPAIS, GNPAI.PADES, GNORP.ORV01
FROM ((GNORP GNORP LEFT OUTER JOIN GNORG GNORG ON GNORP.COORG =
GNORG.COORG) LEFT OUTER JOIN SERVIDOR_CBL.GN_3_0.dbo.GNPAI GNPAI ON
GNORP.CPAIS = GNPAI.COPAI) ORDER BY GNORP.COORG, GNORP.CPAIS

in this case "SERVIDOR_CBL.GN_3_0.dbo.GNPAI" I said the
serverName.BDName.Owner.TableName

But give me an error... Anyone know how can I do this??

Thanks in advance...

Where do you run the select? Websphere II?
If so you need to use NICKNAME

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #2
I use JDBC in a java application. I execute the sentence in the AS400
connection but I have another connection to the sqlserver too...
Serge Rielau <sr*****@ca.ibm.com> wrote in message news:<39*************@individual.net>...
nuria wrote:
hi

I have an AS400 table and SQL server table and need do a JOIN in a
select, I did this:

SELECT GNORP.COORG, GNORG.ORDES, GNORP.CPAIS, GNPAI.PADES, GNORP.ORV01
FROM ((GNORP GNORP LEFT OUTER JOIN GNORG GNORG ON GNORP.COORG =
GNORG.COORG) LEFT OUTER JOIN SERVIDOR_CBL.GN_3_0.dbo.GNPAI GNPAI ON
GNORP.CPAIS = GNPAI.COPAI) ORDER BY GNORP.COORG, GNORP.CPAIS

in this case "SERVIDOR_CBL.GN_3_0.dbo.GNPAI" I said the
serverName.BDName.Owner.TableName

But give me an error... Anyone know how can I do this??

Thanks in advance...

Where do you run the select? Websphere II?
If so you need to use NICKNAME

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
2882
by: news-east.earthlink.net | last post by:
The scenario: two tables CustomerTable --------------- CustomerID OrderID CustomerName CustomerEmail
3
7889
by: fn | last post by:
Can anyone help me understand what it takes to define a Linked Server connection to an IBM eSeries (AS400)? Do I need Microsoft's SNA Server or some other product or can I simply do it with the...
2
5266
by: Niyazi | last post by:
Hi, I have to retrieve a data from AS400 DB2 and after working with data I have to export into one of existing Excel file. I can connect into specific library in AS400 DB2 using AS400...
0
413
by: alan_sec | last post by:
Hi. Does the com.ibm.as400.access.AS400JDBCDriver driver that is part of JTOpen (http://jt400.sourceforge.net) works with db2 udb version 7 that is installed on windows 2000? I' m trying to...
13
7946
by: Sehboo | last post by:
Hello, we have data sitting on AS400 (V4R5M0) - DB2-400. I need to access that from my vb.net application. I don't know anything about AS400. Is it possible to get data from tables and stored...
4
1562
by: Brian Parker | last post by:
I'm new to ms-sqlserver ( 2000 ) and need to get an OUTER JOIN working on a three table query. Assumptions: -- I have events in the Event table. -- Each event CAN have one Transaction, but it's...
1
2249
by: Iain | last post by:
Hi All I am creating a database trigger to write details real time from tables on one AS400 to another over our WAN. Is there such a concept as ODBC connections on the AS400 to perform this...
5
5446
by: mail | last post by:
Urgent help needed! I moved an application from ASP+ACCESS to ASP+MS SQLSERVER and I have the following problem: If the join on two tables results on duplicate colum names (which appear in...
12
25066
by: =?ISO-8859-1?Q?Ren=E9?= | last post by:
Hi, is there a rule of thumb what is better/faster/more performant in SQL Server 2005? a) SELECT * FROM A INNER JOIN B ON B.ID = A.ID AND B.Cond1 = 1 AND B.Cond2 = 2 b) SELECT * FROM A INNER...
0
6920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7061
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7110
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7030
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5367
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
574
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
210
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.