Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Fri, 17 Aug 2007 @ 17:23:04 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: Check constraint.
 
From:   John Hall

Something comes to mind (sorry, but I don't have a machine to test with and it's been a lot of years since I needed to know): Isn't the view SHOWCOLCHECKS limited by access rights of the user? You could probably find more in the Data Dictionary manual.

I think that the couple of people who tested your code were successful because they were the creator of the test table. In your case, I think that if you're looking at a table that you didn't create or for which you don't have access rights, then SHOWCOLCHECKS won't show you information about that table.

This should be easy to test. Create the table in your sandbox and then try your query on the test table. If the sandbox table works and the actual table doesn't, then you have a rights problem.

I have a fading memory, but you might try the query below (I can't test it, but it should be close enough that you can work-out any bugs):

     sel db.databasename
       , tv.tvmname
       , tf.fieldname
       , tf.columncheck

       from dbc.dbase      db
          , dbc.tvm        tv
          , dbc.tvfields   tf

       where db.databasename = 'db'
         and tv.tvmname = 'cust'

         and db.databaseid = tv.databaseid
         and tv.tvmid = tf.tableid
         and tf.columncheck is not null
       ;


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 28 Jun 2020