Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2002
    Posts
    84

    Red face Unanswered: count different from select * rows

    Dear All,

    We encountered this strange problem in DB2. When
    I executed
    > select count (*) from table_abc

    it gave a result of 10.

    When I executed
    > select * from table_abc
    there were totally 15 rows returned.

    What is more, the odd thing is I could neither select those
    5 rows individually, nor delete them. I could not even delete
    all records from table. It gave SQL 0902C (reason 44) error.

    Any idea about what is going wrong?

    TIA.

  2. #2
    Join Date
    Feb 2002
    Location
    Germany
    Posts
    141
    Just a question: do you have any summary tables defined on table_abc?
    Rodney Krick

  3. #3
    Join Date
    Jan 2003
    Posts
    1,605

    Re: count different from select * rows

    Hi,

    What verson of DB2 do you have? What platform? Do you have some fixpacks installed? Post more information about your system.

    Hope this helps,
    Grofaty

    Originally posted by qxz
    Dear All,

    We encountered this strange problem in DB2. When
    I executed
    > select count (*) from table_abc

    it gave a result of 10.

    When I executed
    > select * from table_abc
    there were totally 15 rows returned.

    What is more, the odd thing is I could neither select those
    5 rows individually, nor delete them. I could not even delete
    all records from table. It gave SQL 0902C (reason 44) error.

    Any idea about what is going wrong?

    TIA.

  4. #4
    Join Date
    Apr 2002
    Posts
    84

    Re: count different from select * rows

    There is no summay table linking to table_abc. You mean
    summary table may cause the problem? Could you please
    elaborate a bit.

    We are using DB2 V5 in WinNT. To my knowledge, there was
    no fix installed.

    Thanks.


    Originally posted by grofaty
    Hi,

    What verson of DB2 do you have? What platform? Do you have some fixpacks installed? Post more information about your system.

    Hope this helps,
    Grofaty

  5. #5
    Join Date
    Jan 2003
    Posts
    1,605

    Re: count different from select * rows

    Hi,

    I don't know if this helps but on IBM support page you can find fixpack 17 for DB2 5.1. Check Fixpak 17 Bug Fix List before downloading fixpack.

    IBM DB2 suport page
    http://www-3.ibm.com/cgi-bin/db2www/...report#WINDOWS

    Check the fixpack you have installed on your system by executing the command "db2level" in command prompt. Then compere "informational tokens" from your command prompt to "Signature" in above web page.

    Hope this helps,
    Grofaty

    Originally posted by qxz
    There is no summay table linking to table_abc. You mean
    summary table may cause the problem? Could you please
    elaborate a bit.

    We are using DB2 V5 in WinNT. To my knowledge, there was
    no fix installed.

    Thanks.

  6. #6
    Join Date
    Oct 2001
    Location
    Bangalore
    Posts
    186
    Hi,

    Try to select data after a runstats and reorg.

    Cheers,
    Prashant

Posting Permissions

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