Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 14 Aug 2003 @ 11:46:19 GMT


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


Subj:   Re: Restricting access on ceratin columns in a table/view
 
From:   Claybourne Barrineau

Swapnil,

I suppose, if you are willing, that you could create a table containing 2 columns (all user-ids and a valid user-id indicator column.) Once this table is created, your view syntax could look something like this:

Replace View  .....
(
ColA
ColB
Col...
) as
Select      Original_Table.ColA
,     Case When   Valid_User_Table.Valid_User_Ind     =     'Y' then
Original_Table.ColB else '######' end
      ....
From  Original_Table
,     Valid_User_Table*
Where User  =           Valid_User_Table.Valid_User_ID

*where Valid_User_ID is UPI of Valid_User_Table. Note, if a new user isn't added to this table, the respective user will get no results from the view.

Since only one row should be returned from the Valid_User_Table, then the resulting cross-product join shouldn't result in bad results. Performance ought to be fine, also.


Hope this helps,

Clay



     
  <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: 15 Jun 2023