Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 25 Apr 2003 @ 19:25:44 GMT


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


Subj:   Re: Idea for the implementation of a view needed
 
From:   ulrich arndt

Are you going to qualifing the PI always when you access the view?

If yes - if you cust_id 123 in table customer_restricted you will get NO row back in case you submit

sel * from member_activity_restricted
where cust_id = 123
;

as 123 is mapped to 0 and is therefore not part of the result set.

Is this what you want?

If yes -
try
REPLACE VIEW member_activity_restricted AS
SELECT
 a.activity,
 a.cust_id
FROM
member_activity a
LEFT JOIN
customer_restricted b
ON a.cust_id = b.cust_id
where b.cust_id is null
;

This should return no row for 123 but this fast.

If there was a NO answer before give us some more details.

Ulrich



     
  <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