Ask the Expert

SQL has stopped selecting records

We have an application that uses SQL to select the records for a report. The application has been working with over 50 customers using all different operating systems. We haven't changed the program or the operating systems, but have come across a number of instances that the SQL has stopped selecting records. We haven't been able to figure out the problem. Our solution has been to use an older version of the program that uses an open-query file instead of SQL.

OPNQRYF and SQL essentially use the same engine code to select and reject records, so the two interfaces behaving differently should not occur very often. Is it possible that SQL is returning the rows in a different order instead of not selecting the right records? This is possible with SQL since the order of the results is only guaranteed when an ORDER BY clause is included on your SQL request. If ordering of the result rows is not the problem, then I'd suggest that you make sure you have the latest database group PTF. If you have the latest fixes and the problem still persists, then report this as a defect to IBM Support.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

Search400.com's targeted search engine: Get relevant information on DB2/400.

The Best Web Links: tips, tutorials and more.

Check out this online event, Getting the Most out of SQL & DB2 UDB for the iSeries.


This was first published in April 2003

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: