Getting ready

Connect to Teradata Database using SQLA or Studio. We will create the following table in one of the databases:

/*UPSERT create table*/CREATE SET TABLE td_cookbook_nyse.mktprice ,NO FALLBACK ,
     NO BEFORE JOURNAL,
     NO AFTER JOURNAL,
     CHECKSUM = DEFAULT,
     DEFAULT MERGEBLOCKRATIO
     (
     symbol CHAR(10) CHARACTER SET LATIN NOT CASESPECIFIC,
      id varchar(10),
      open_share DECIMAL(18,0)
      )
      PRIMARY INDEX ( id );

Let's populate this table with some data. UPSERT will be done based on these values:

/*Insert values*/insert into td_cookbook_nyse.mktprice ...

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.