If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > query give wrong value for check constrain

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-05-04, 16:45
shussain44 shussain44 is offline
Registered User
 
Join Date: Feb 2004
Posts: 4
Red face query give wrong value for check constrain

I am querying following sys tables to get the check constraint information for particular column.
select colname,tabname,constrname
from sysconstraints A, systables B, syscolumns C
where tabname = 'sarorders'
and B.tabid = A.tabid
and B.tabid = C.tabid
and constrtype = 'C'
and colname = 'sotype';
colname tabname constrname

sotype sarorders c160_214
sotype sarorders c160_215
sotype sarorders c160_216
sotype sarorders c160_473


But sotype column should have only one check constraint

CONSTRAINTS - sarorders: Reference Primary Check Unique Defaults Exit
Display check constraints.

----------------------- lnp_160@colt_tcp ------- Press CTRL-W for Help --------

Constraint name Value

c160_214 (sofieldeditflag IN ('T' ,'F' ))
c160_215 (somangenflag IN ('T' ,'F' ))
c160_216 (solautorevflag IN ('T' ,'F' ))
c160_473 (sotype IN (1 ,2 ,3 ,4 ,5 ))

What's wrong with my query? Thanks in advance Sh
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On