Hi Bill,
I checked all the tables that reference the CustomerNo and all look ok (they 
show up in List Constraints).
But I'm not sure how to do the following:
    "But when you click on the individual key, you don't see the correct 
referenced table and column in the other box"
Where do I go to click on the individual key?  I clicked where I saw it but 
nothing happened.

Also an interesting thing ocurred on the way to the forum:
I copied the database and the original has id #92 for the table 49ee1862  and 
the copy has it as  #55
Also the list constraints on the copied database is in a different order.
Is this normal?  Or do I have another problem?
  ----- ..Original Message ----- 
  From: Bill Downall 
  To: RBASE-L Mailing List 
  Sent: Monday, November 01, 2010 2:18 PM
  Subject: [RBASE-L] - Re: Strange Table


  Bernie,


  Primary Keys don't have ref Table Names or ref Column Names. Only Foreign 
Keys do. 


  The problem constraint is not a constraint on 49ee1862, it is a constraint on 
some other table that probably should be pointing to Customer, but is instead 
pointing to 49ee1862, or to nowhere at all.


  Just do a LIST CONSTRAINTS command, and look through it carefully for foreign 
keys that either:  
  a) have a ref table of 49ee1862, or
  b) have no ref table or ref column at all


  That is or those are the constraints that need dropping. It's not any 
constraint you would see with LIST CONSTR FOR TABLE, and the ones with no valid 
reference table don't appear to show up with LIST FKEYS, either. 


  Your only PK in Customer is a CustomerNo. Go into DB Designer/Tables, and 
look at every table that has a CustomerNo column (by that name or any other 
name), and check all of the KEYS/Indexes. You may find some that don't show up 
in LIST CONSTRAINTS and don't show up in LIST FKEYS, but are damaged partial 
FK's anyway, and that do appear in the list of Keys and Indexes in the table 
designer. But when you click on the individual key, you don't see the correct 
referenced table and column in the other box..


  Drop those constraints in the DB Designer. Save your changes. Then go back in 
and build them again correctly.


  Bill


  On Mon, Nov 1, 2010 at 1:32 PM, Bernard Lis <[email protected]> wrote:

    I need to get rid of this table (it seems to be a copy of the customer 
    table)
    If I try to delete it, it says that a col is being referenced.

    Please help:
    I can't find where this col is being referenced.

    R>list constraint for 49ee1862

         Table Name: 49ee1862

    Id     Type             Column Name(s)     Ref Table Name     Ref Column 
    Name(s)

    ------ ----------------              ------------------ ------------------ 
------------------
    #55    PRIMARY KEY      CustomerNo

    Note that there is no  ref Table Name  and no  Ref Col Name


    R>list fkeys    Doesn't seem to shed any light on this -- unless I don't 
    know how to interpret the  Id#
    does the id shown below have any relation to a primary key or merely a 
    number assigned to a foreign key?

    Id     Type                          Table Name         References
    ------ ----------------------------- ------------------ ------------------
    #67    FOREIGN KEY                   ServiceContract    OrderHeader
    #93    FOREIGN KEY                   Credits            OrderHeader
    #78    FOREIGN KEY                   OrderTrucks        OrderHeader
    #81    FOREIGN KEY                   ProposalDetail     Proposal
    #82    FOREIGN KEY                   SCSchedule         ServiceContract
    #83    FOREIGN KEY                   SCService          ServiceContract
    #84    FOREIGN KEY                   SCOrders           ServiceContract
    #88    FOREIGN KEY                   OrderRemark        OrderHeader
    #89    FOREIGN KEY                   dbdummy2           DBDummy
    #90    FOREIGN KEY                   Debits             OrderHeader
    #42    FOREIGN KEY                   Payments           OrderHeader
    #65    FOREIGN KEY                   OrderDetail        OrderHeader
    #63    FOREIGN KEY                   OldDtl             OldHdr 


Reply via email to