Finding Tables without any Primary key

This is a discussion on Finding Tables without any Primary key within the ibm-db2 forums in Other Databases category; My Problem: ------------------ 1- When I was trying to run some queries like below, I got the error like this: ------------------------------ Command Entered ------------------------------ select * from bank1.abrnparams ; ----------------------------------------------------------------------------- SQL0540N The definition of table BANK1.ABRNPARAMS 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.SYSCOLUMNS.KEYSEQ by: SELECT DISTINCT KEYSEQ, COUNT(*) FROM SYSIBM.SYSCOLUMNS GROUP BY KEYSEQ; All tables in my schema, has one key column at least. What ...

Go Back   Database Forum > Other Databases > ibm-db2

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-19-2008, 08:13 AM
Default 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.abrnparams ;
-----------------------------------------------------------------------------
SQL0540N The definition of table "BANK1.ABRNPARAMS" 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.SYSCOLUMNS.KEYSEQ by:

SELECT DISTINCT KEYSEQ, COUNT(*)
FROM SYSIBM.SYSCOLUMNS
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.
Reply With Quote
  #2  
Old 07-19-2008, 11:08 AM
Default 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
Reply With Quote
  #3  
Old 09-14-2008, 03:39 AM
Default Re: Finding Tables without any Primary key

On 19 ÌæáÜ, 17:08, Serge Rielau wrote:
> 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
Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 09:46 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Integrated by bbpixel2009 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.