How to do it...

  1. Connect to Teradata Database using SQLA or Studio.
  2. Create the following view of the tables with a condition of a WHERE clause:
/*Create a view*/CREATE VIEW td_cookbookV.EMP_TBL_View
AS  
Select
E.EMP_ID,
D.EMP_DEPT,
D.DEPT_CITY
FROM
td_cookbook.EMP_TBL_A E inner join
td_cookbook.EMP_TBL_B D ON
E.EMP_ID=D.EMP_ID
Where e.EMP_ID=1032
  1. Once the view is created, execute the following SELECT on td_cookbookV.EMP_TBL_View to retrieve the rows based on the condition defined:
/*Select on view*/SEL * from td_cookbookV.EMP_TBL_View
  1. The following would be the result set of the query executed:
 
  1. Next, we will REPLACE the view using the ...

Get Teradata Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.