Subject Re: [ib-support] Alter table error
Author Antonio Natividad
Hello:

This is my case:

SQL> create table t(a int, b int not null);
SQL> alter table t add constraint un_b unique(b);
SQL> alter table t drop constraint un_b;
SQL> alter table t drop b;

SQL> alter table t add b int not null;
SQL> alter table t add constraint un_b unique(b);

The error is in the 5 line (sometimes in the 6)

--- "Claudio Valderrama C." <cvalde@...>
escribió: > "Antonio Natividad"
<locosoft_lnx@...>
> wrote in message
>
news:20011214185320.85061.qmail@......
> >
> > First My table had a field named Campo1 and it had
> an
> > Unique Constraint, then I dropped it and the field
> too
> > but when I'm trying to create the field(alter
> table
> > sentence) Campo1 again IB return an error like
> this:
> >
> ---------------------------------------------------
> > Statement failed, SQLCODE = -607
> >
> > Unsuccesful metadata update
> > - STORE RDB$RELATION_FIELDS failed
> > - attemp to store duplicate value (visible to
> active
> > transactions) in unique index "RDB$INDEX_15"
> >
> ---------------------------------------------------
>
> Is this your case?
>
> SQL> create table t(a int, b int not null unique);
> SQL> alter table t drop b;
> SQL> alter table t add b int not null unique;
> SQL>
>
> I don't see any error.
>
> C.
> --
> Claudio Valderrama C. - http://www.cvalde.com -
> http://www.firebirdSql.org
> Independent developer
> Owner of the Interbase® WebRing
>
>
> ------------------------ Yahoo! Groups Sponsor
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>

_________________________________________________________
Do You Yahoo!?
Encuentra el coche de tus sueños en Yahoo! Autos http://autos.yahoo.com.mx