Hi Gang!

While  preparing the final steps to migrate from dBase/FB 1.5 to C#/FB
2.5  I  need  to create a unique constraint for the old databases, and
need some help from someone still familiar with 1.5.

Not  using  uniques  too  often, so it's probably something I am doing
basically wrong, but I can't create the following unique constraint:

          alter table T
          add constraint UNQ1_T
          unique (F1, F2)
          using index UC_T

I receive the following error:

Invalid insert or update value(s): object columns are constrained - no 2 table 
rows can have duplicate column values.
attempt to store duplicate value (visible to active transactions) in unique 
index "@1".

I  checked  that  at  this  moment  the  table  should be "clean" from
duplicates by using the following statement:

           select
             T.F1,
             T.F2,
             count(T.ID)
           from
             T
           group by
             1, 2
           having
             count(T.ID) > 1

The   result after the first run was a  bunch of rows which would have
violated  the  unique. I cleared them off using a "For select..." in a
stored proc and subsequent runs yield only empty rowsets.
So the table should be ready for the unique shouldn't it?

Can  somebody  help  me to see the forest with all these trees around,
please? What else could stop a unique like this? If I make a backup of
the  database and restore it to a FB 2.5 server, the unique is created
just  fine.  The  old server is Classic Engine, if that should matter.

Thanks in advance!




mit freundlichen Grüßen,

André Knappstein
EDV und Controlling
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
beta Eigenheim- und Grundstücksverwertungsgesellschaft mbH
Hafenweg 4
59192 Bergkamen-Rünthe

Telefon: +49 2389 9240 140
Telefax: +49 2389 9240 150
e-mail:  [email protected]

Amtsgericht Hamm Nr. B 420
Geschäftsführer: Achim Krähling, Dirk Salewski und Matthias Steinhaus

USt-IDNr.: DE 125215402



------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu.  Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/firebird-support/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/us/yahoo/utos/terms/

Reply via email to