Finding Tables without any Primary key

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • amir

    #1

    Finding Tables without any Primary key

    My Problem:
    ------------------
    1- When I was trying to run some queries like below, I got the error
    like this:
    ------------------------------ Command Entered
    ------------------------------
    select * from bank1.abrnparam s ;
    -----------------------------------------------------------------------------
    SQL0540N The definition of table "BANK1.ABRNPARA MS" is incomplete
    because it
    lacks a primary index or a required unique index. SQLSTATE=57001
    2- Also, when I tried to show some Tables in C#, I got same.

    What I have done:
    -------------------------
    I tried to check the problem through checking the
    SYSIBM.SYSCOLUM NS.KEYSEQ by:

    SELECT DISTINCT KEYSEQ, COUNT(*)
    FROM SYSIBM.SYSCOLUM NS
    GROUP BY KEYSEQ;

    All tables in my schema, has one key column at least.

    What I need:
    ------------------
    I need a solution for facing to error I got above.
    Any help will appreciated, before.
  • Serge Rielau

    #2
    Re: Finding Tables without any Primary key

    Which platform and version of DB2 are you on?
    Which client interface and version are you using?

    (This smells like the client wants to keep bookmarks fro editing....)
    Cheers
    Serge

    --
    Serge Rielau
    DB2 Solutions Development
    IBM Toronto Lab

    Comment

    • amir

      #3
      Re: Finding Tables without any Primary key

      On 19 ÌæáÜ, 17:08, Serge Rielau <srie...@ca.ibm .comwrote:
      Which platform and version of DB2 are you on?
      Which client interface and version are you using?
      >
      (This smells like the client wants to keep bookmarks fro editing....)
      Cheers
      Serge
      >
      --
      Serge Rielau
      DB2 Solutions Development
      IBM Toronto Lab
      Dear Friend,
      I think the table has some BLOB and not defined good.
      Our Database version is UDB v7.1 also.

      I AM LOOKING FOR
      how to define BLOB fields in the DB2 way (different tables) in my DB2
      version?
      Thanks

      Comment

      Working...