Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

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.


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.

Dig Deeper on DB2 UDB (universal databases)

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.