Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 06 Sep 2012 @ 19:32:32 GMT


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


Subj:   Re: Avoiding Multiple Views
 
From:   De Pons, Paul

One way I can think of is to?create a cross reference table with Logon User ID to source system ID

     CREATE TABLE USER_SOURCE_CROSS_REF
     (USER_ID VARCHAR(50)
     ,SOURCE_SYSTEM_ID INTEGER
     ) UNIQUE PRIMARY INDEX (USER_ID)

Base table includes SOURCE_SYSTEM_ID

View would then be

     CREATE BASE_VIEW AS
     SELECT A.*
     FROM BASETABLE AS A
     INNER JOIN USER_SOURCE_CROSS_REF B
     ON A.SOURCE_SYSTEM_ID = B.SOURCE_SYSTEM_ID
     WHERE B.USER_ID = USER


     
  <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