Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 04 Nov 2010 @ 19:57:49 GMT


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


Subj:   Multi statement code stops before completion
 
From:   Anomy Anom

<-- Anonymously Posted: Thursday, November 4, 2010 10:54 -->

I run a script in Teradata which contains 166 statements. The code always stops at statement 155. The previous statement finishes with ';' and there is no error returned. Any idea why this might be happening. The below script is the 154th and 155th statements

     create table PROD_db.MEMBERS_B
     AS
     (
     SELECT  PTMP1.Member_Lifetime_Number
             ,PTMP1.Membership_Number
             ,PTMP1.Member_Title
             ,PTMP1.Forename
             ,PTMP1.Surname
             ,PTMP1.Birth_Date
             ,PTMP1.ages
             ,PTMP1.Gender
             ,PTMP1.Relationship_Description
             ,PTMP1.Contact_Title
             ,PTMP1.Contact_Forename
             ,PTMP1.Contact_Surname
             ,PTMP1.contact_Salutation
             ,PTMP1.Contact_Name
             ,PTMP1.Contact_Type_Code
             ,PTMP1.Contact_Type_Description
             ,PTMP1.Family_Status_Description
             ,PTMP1.House_Name_Number
             ,PTMP1.Address_Line_1
             ,PTMP1.Address_Line_2
             ,PTMP1.Address_Line_3
             ,PTMP1.Post_Town
             ,PTMP1.Postcode
             ,PTMP1.Formatted_Address
             ,PTMP1.ADDRESS_ID
             ,PTMP1.Telephone_Number
             ,PTMP1.Alt_Telephone_Number
             ,PTMP1.Mobile_Telephone_Number
             ,PTMP1.Email_Address
             ,PTMP1.Product_Base_Name
             ,PTMP1.Int_org_name
             ,PTMP1.Contract_Product_Base_Name
             ,PTMP1.Business_Type
             ,PTMP1.Original_Joining_Date
             ,PTMP1.tenure
             ,PTMP1.Renewal_Date
             ,PTMP1.Group_Number
             ,PTMP1.Group_Name
             ,PTMP1.Registration_Do_Not_Contact
             ,PTMP1.Member_Do_Not_Contact
             ,PTMP1.Special_Claims_Indicator
             ,PTMP1.MEMBER_PARTY_ID
             ,PTMP1.Contract_id
             ,PTMP1.Product_Descr
             ,PTMP1.product_id
             ,PTMP1.INTERMEDIARY_ID
             ,PTMP1.INTERMEDIARY_NAME
             ,PSEGM.Segment_Value
             ,PSEGM.Segment_name
             ,PSEGM.subs_last_12_mnths
             ,PSEGM.max_curr_value_in_last_5
             ,PSEGM.max_curr_value_yr5
             ,PSEGM.total_lifetime_value_last_5
             ,PSEGM.ave_lifetime_value_last_5
             ,PSEGM.claims_current_year
             ,PSEGM.claims_count_current_year
             ,PSEGM.total_claims_last_5
             ,PSEGM.total_claims_count_last_5
             ,PSEGM.Years_since_last_claimed
             ,PSEGM.Years_since_claim_free
             ,PTMP1.SENSITIVE_GROUP_INDICATOR
             ,PTMP1.Lapsed_Indicator
             ,PTMP1.lapse_effective_date
             ,PTMP1.LAPSE_SUSPENSION_TYPE_CODE
             ,PTMP1.REG_REINSTTMNT_PROCESSED_DATE
             ,PTMP1.reg_lapse_reasn_combination_id
             ,PTMP1.lapse_reason_id1
             ,PTMP1.lapse_reason_id2
             ,PTMP1.lapse_reason_id3
             ,PTMP1.fallow_group
             ,PTMP1.tps_indicator
     FROM  PROD_db.MEMBERS_A         PTMP1

     LEFT OUTER join PROD_db.SEGMENTATION_MASTER_FINAL       PSEGM
     on      Ptmp1.Membership_Number = PSEGM.Membership_Number
     )
     WITH DATA
     ;

     /* This module has been added to append a deceased flag to the final table
     */

     create table PROD_db.M_P_FINAL_2_temp_a
     AS
     (
     SELECT  Member_Lifetime_Number
             ,Membership_Number
             ,Member_Title
             ,Forename
             ,Surname
             ,Birth_Date
             ,ages
             ,Gender
             ,Relationship_Description
             ,Contact_Title
             ,Contact_Forename
             ,Contact_Surname
             ,contact_Salutation
             ,Contact_Name
             ,Contact_Type_Code
             ,Contact_Type_Description
             ,Family_Status_Description
             ,House_Name_Number
             ,Address_Line_1
             ,Address_Line_2
             ,Address_Line_3
             ,Post_Town
             ,Postcode
             ,Formatted_Address
             ,address_id
             ,Telephone_Number
             ,Alt_Telephone_Number
             ,Mobile_Telephone_Number
             ,Email_Address
             ,Product_Base_Name
             ,Int_org_name
             ,Contract_Product_Base_Name
             ,Business_Type
             ,Original_Joining_Date
             ,tenure
             ,Renewal_Date
             ,Group_Number
             ,Group_Name
             ,Registration_Do_Not_Contact
             ,Member_Do_Not_Contact
             ,Special_Claims_Indicator
             ,MEMBER_PARTY_ID
             ,Contract_id
             ,Product_Descr
             ,product_id
             ,INTERMEDIARY_ID
             ,INTERMEDIARY_NAME
             ,Segment_Value
             ,Segment_name
             ,subs_last_12_mnths
             ,max_curr_value_in_last_5
             ,max_curr_value_yr5
             ,total_lifetime_value_last_5
             ,ave_lifetime_value_last_5
             ,claims_current_year
             ,claims_count_current_year
             ,total_claims_last_5
             ,total_claims_count_last_5
             ,Years_since_last_claimed
             ,Years_since_claim_free
             ,SENSITIVE_GROUP_INDICATOR
             ,Lapsed_Indicator
             ,lapse_effective_date
             ,LAPSE_SUSPENSION_TYPE_CODE
             ,REG_REINSTTMNT_PROCESSED_DATE
             ,reg_lapse_reasn_combination_id
             ,lapse_reason_id1
             ,lapse_reason_id2
             ,lapse_reason_id3
             ,fallow_group
             ,tps_indicator
             ,OREPLACE(UPPER(Forename)||UPPER(Surname)||UPPER(Postcode),' ','')
     as MATCHKEY
     FROM  PROD_db.MEMBERS_B
     )
     WITH DATA
     ;


     
  <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