dbTalk Databases Forums  

DB2 join operator

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss DB2 join operator in the comp.databases.ibm-db2 forum.



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

Default DB2 join operator - 04-20-2010 , 01:25 PM






Hi,

I have a query that runs fine with SQL Server but gives me an
exception with DB2

Part of the query using join operator and the ON clause contains
subquery.
The exception I am getting is the following:

An ON clause associated with a JOIN operator or in a MERGE statement
is
not valid for one of the following reasons.
* The ON clause cannot include any subqueries.
......

Should I re-write the query for DB2 that would be different in this
case from what I am using with SQL Server or there is another way to
do it?

Reply With Quote
  #2  
Old   
Ian
 
Posts: n/a

Default Re: DB2 join operator - 04-20-2010 , 11:19 PM






On 4/20/10 11:25 AM, mark wrote:
Quote:
I have a query that runs fine with SQL Server but gives me an
exception with DB2

It would be useful if you actually posted the query that you're
having a problem with.

Reply With Quote
  #3  
Old   
--CELKO--
 
Posts: n/a

Default Re: DB2 join operator - 04-26-2010 , 09:53 PM



"A problem well stated is a problem half solved." -- Charles F.
Kettering

It is very hard to debug code when you do not let us see it.

Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, data types, etc. in
your schema are. If you know how, follow ISO-11179 data element naming
conventions and formatting rules. Temporal data should use ISO-8601
formats. Code should be in Standard SQL as much as possible and not
local dialect.

Sample data is also a good idea, along with clear specifications. If
you want to learn how to ask a question on a Newsgroup, look at:
http://www.catb.org/~esr/faqs/smart-questions.html

Reply With Quote
  #4  
Old   
Serge Rielau
 
Posts: n/a

Default Re: DB2 join operator - 04-27-2010 , 11:30 PM



On 4/20/2010 11:55 PM, mark wrote:
Quote:
Hi,

I have a query that runs fine with SQL Server but gives me an
exception with DB2

Part of the query using join operator and the ON clause contains
subquery.
The exception I am getting is the following:

An ON clause associated with a JOIN operator or in a MERGE statement
is
not valid for one of the following reasons.
* The ON clause cannot include any subqueries.
.....

Should I re-write the query for DB2 that would be different in this
case from what I am using with SQL Server or there is another way to
do it?
That is what the message is saying, yes.


--
Serge Rielau
SQL Architect DB2 for LUW
IBM Toronto Lab

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.