473,320 Members | 1,988 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

SQL0338N

We have a user who is trying to generate a report from a db2 database. He is
using a tool from a third party vendor, where he first designs the report
and the tool then generates the SQL from the choices made by the user. When
this report is generated in our test environment it works fine, but in the
production environment it gives this error message:

"SuperOffice Caesar webCRM - An error occured
Description:
ERROR [42972][IBM][DB2/NT] SQL0338N An ON clause associated with a join
operator or in a MERGE statement is not valid. SQLSTATE=42972
Error type: IBM.Data.DB2.DB2Exception
Error source: IBM.Data.DB2
URL: /caesar/Applications/Reports/ShowResult.aspx
Version: 5.1.0.444"

The test and production environment both are Windows 2003 Enterprise Server,
and DB2 ESE version 8.1, fixpack 10. The test environment is 1 CPU 1 GHz, 2
GB RAM,
production has 2 CPU 3, 05 GHz, 3.75 GB RAM.

Now I start to wonder why thing works in the test environment but not in
production.
Of course there are much more going on in production than in test, and I
suppose that can
explain why this happens. The configuration on both instance and database
level also is
different in the two environments.

If the configuration is an issue here, which parameter(s) should I look at
first?

And is there a way to capture the SQL that is generated, to be certain that
this is
identical in test and production?

**************
Regards
Odd Bjørn Andersen
ErgoGroup AS, Oslo, Norway
Aug 9 '06 #1
1 4140
Odd Bjørn Andersen wrote:
We have a user who is trying to generate a report from a db2 database. He is
using a tool from a third party vendor, where he first designs the report
and the tool then generates the SQL from the choices made by the user. When
this report is generated in our test environment it works fine, but in the
production environment it gives this error message:

"SuperOffice Caesar webCRM - An error occured
Description:
ERROR [42972][IBM][DB2/NT] SQL0338N An ON clause associated with a join
operator or in a MERGE statement is not valid. SQLSTATE=42972
Error type: IBM.Data.DB2.DB2Exception
Error source: IBM.Data.DB2
URL: /caesar/Applications/Reports/ShowResult.aspx
Version: 5.1.0.444"

The test and production environment both are Windows 2003 Enterprise Server,
and DB2 ESE version 8.1, fixpack 10. The test environment is 1 CPU 1 GHz, 2
GB RAM,
production has 2 CPU 3, 05 GHz, 3.75 GB RAM.

Now I start to wonder why thing works in the test environment but not in
production.
Of course there are much more going on in production than in test, and I
suppose that can
explain why this happens. The configuration on both instance and database
level also is
different in the two environments.

If the configuration is an issue here, which parameter(s) should I look at
first?
Since this is an SQL compile error I don't see this as a configuration
issue in DB2. It could only be that your app generates different SQL
>
And is there a way to capture the SQL that is generated, to be certain that
this is
identical in test and production?
Snapshots won't help here since the statement never compiled.
You would need to trace the client or the communication.
I would start with a DRDA trace:
http://publib.boulder.ibm.com/infoce...e/r0001997.htm

W.r.t. how to get SQL338 look for:
SQL Functions in the on clause
Columns not local to the on clause
Subqueries in the on clause.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Aug 9 '06 #2

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

Similar topics

1
by: cbielins | last post by:
I'm trying to join a dimension table to a summary table using an inner join. However, I would like to join using a udf that I've created. Example: select ... from fact_table fact inner join...
5
by: Sascha.Moellering | last post by:
Hi, I receive the error code SQL0338N if I try to compile this statement (part of the statement): .... left outer join lateral (SELECT * FROM LIZSYSABA.VWZL0359TBS WHERE tbs_name = CASE WHEN...
4
by: Sascha.Moellering | last post by:
Hi, the following SQL-Statement does not compile, I receive SQL0338N as an error. The erroneous parts of the statement are the left-outer-Joins, but I don't know how to solve the problem, any...
6
by: wellhole | last post by:
Is there any way to improve this statement? A is the header table while B has 0 to many records for each record in A. I'm trying to pick only the latest record in B for the associated seq in A. ...
3
by: tejasmore | last post by:
Hi, I am running a following query in DB2 and getting SQL0338n error. This is primarily because, there are subqueries at few places (marked in bold)in the main query, after 'ON' clause. Could...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.