Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004

    Unanswered: Strange SQL +100 Warning

    Hi -anyone here ever seen an SQL +100 Warning when performing SELECT COUNT(*)? - I'm very familiar with +100 warnings (i.e. no rows found) but this is a strange case since for a SELECT COUNT(*) one should simply receive a count of zero with a normal return code if no rows match the WHERE criteria. We do have a sub SELECT within the WHERE - could that do it?

    What's really strange is that the query runs fine from SPUFI / DB2 Command Center - but in the binded module it receives this error.

    We're on DB2 V7.

    Thanks for the help!
    Last edited by Grumpy; 02-09-04 at 16:44.

  2. #2
    Join Date
    May 2003
    I ran the following query using the CLI on DB2 V8 for Linux:

    select * from employee
    where edlevel =
    (select count(*) from employee where lastname ='xxx')

    I got no rows back and return code of +100

    If I just run the subquery portion by itself, I get "0" back with return code of 0.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Jan 2004
    in all cases SQLCODE 100 should be handled in the program, so u can set the number of rows returned to 0
    hany heggy,
    IBM certified Professional, AIX system support

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts