Given a null constraint name how to know its colum
Posted in 2008
Topics: General Discussion
Hi every one... Maybe some one can help on this: I'm using a violation table for loading some records. In the diagnostic table (ie table-name_dia i'm seeing constraint violations named like this: "n103_86". I read that "n" means it is a null constraint, 103 is the table id (although the violation table say the name already) and 86 is the id of sysconstraints. The problem is that when I defined the table i didn't give any constraint name to "not null" columns and I have several not null columns. So given an informix generated constraint name like "n103_86" how do I know which not null column it refers to? Thank in advance. J. PD: syscolumns and sysconstraints doesn't give much information on this ...
syscoldepend does it! Sorry to bother ... J. 2008/10/2 Jean Sagi <jeansagi.ifx@gmail.com> > Hi every one... > Maybe some one can help on this: > > I'm using a violation table for loading some records. In the diagnostic > table (ie table-name_dia i'm seeing constraint violations named like this: > "n103_86". > I read that "n" means it is a null constraint, 103 is the table id > (although > the violation table say the name already) and 86 is the id of > sysconstraints. > > The problem is that when I defined the table i didn't give any constraint > name to "not null" columns and I have several not null columns. > > So given an informix generated constraint name like "n103_86" how do I know > which not null column it refers to? > > Thank in advance. > > J. > > PD: syscolumns and sysconstraints doesn't give much information on this ... > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > >
select st.tabid, st.tabname, sc.colno, sc.colname
from sysconstraints as scs, syscoldepends as scd, systables as st,syscolumns as sc
where constrname = 'n103_86'
and scs.constrid = sdc.constrid
and scs.tabid = st.tabid
and scd.tabid = sc.tabid
and scd.colno = sc.colno;
Art
On Thu, Oct 2, 2008 at 9:31 PM, Jean Sagi <jeansagi.ifx@gmail.com> wrote:
> Hi every one...
> Maybe some one can help on this:
>
> I'm using a violation table for loading some records. In the diagnostic
> table (ie table-name_dia i'm seeing constraint violations named like this:
> "n103_86".
> I read that "n" means it is a null constraint, 103 is the table id
> (although
> the violation table say the name already) and 86 is the id of
> sysconstraints.
>
> The problem is that when I defined the table i didn't give any constraint
> name to "not null" columns and I have several not null columns.
>
> So given an informix generated constraint name like "n103_86" how do I know
> which not null column it refers to?
>
> Thank in advance.
>
> J.
>
> PD: syscolumns and sysconstraints doesn't give much information on this ...
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
Thanks a lot !
J.
2008/10/2 Art Kagel <art.kagel@gmail.com>
> select st.tabid, st.tabname, sc.colno, sc.colname
> from sysconstraints as scs, syscoldepends as scd, systables as st,> syscolumns as sc
> where constrname = 'n103_86'
> and scs.constrid = sdc.constrid
> and scs.tabid = st.tabid
> and scd.tabid = sc.tabid
> and scd.colno = sc.colno;
>
> Art
>
> On Thu, Oct 2, 2008 at 9:31 PM, Jean Sagi <jeansagi.ifx@gmail.com> wrote:
>
> > Hi every one...
> > Maybe some one can help on this:
> >
> > I'm using a violation table for loading some records. In the diagnostic
> > table (ie table-name_dia i'm seeing constraint violations named like
> this:
> > "n103_86".
> > I read that "n" means it is a null constraint, 103 is the table id
> > (although
> > the violation table say the name already) and 86 is the id of
> > sysconstraints.
> >
> > The problem is that when I defined the table i didn't give any constraint
> > name to "not null" columns and I have several not null columns.
> >
> > So given an informix generated constraint name like "n103_86" how do I
> know
> > which not null column it refers to?
> >
> > Thank in advance.
> >
> > J.
> >
> > PD: syscolumns and sysconstraints doesn't give much information on this
> ...
> >
> >
> >
> >
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --
> Art S. Kagel
> Oninit (www.oninit.com)
> IIUG Board of Directors (art@iiug.org)
>
> Disclaimer: Please keep in mind that my own opinions are my own opinions
> and
> do not reflect on my employer, Oninit, the IIUG, nor any other organization
> with which I am associated either explicitly or implicitly. Neither do
> those opinions reflect those of other individuals affiliated with any
> entity
> with which I am affiliated nor those of the entities themselves.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>