DROP TABLE IF EXISTS p20_pdm.t01_crm_account; CREATE TABLE IF NOT EXISTS p20_pdm.t01_crm_account ( accountnumber text , name text , tek_channelidname text , address1_city text , tek_address1_stateidname text , tek_address1_countryidname text , address1_line1 text , address1_postalcode text , tek_accountterritoryidname text , statecodename text , tek_omarcustomercode text , tek_erpsitenumber text , tek_newcountofactivecontacts text , tek_countofcases text , tek_countofleads text , tek_countofopportunities text , tek_countofnamedaccount text , createdbyname text , createdon text , tek_3yearvalue text , tek_3yrordertotal text , customertypecodename text , adx_activeopportunitycount text , donotbulkemail text , donotbulkpostalmail text , donotemail text , donotfax text , donotpostalmail text , donotphone text , ftv_dqphoneclean text , tek_op_duplicatestatusname text , tek_plussetupcompletedname text , tek_customeridname text , tek_industryidname text , tek_mkto_channel text , tek_mkto_region text , modifiedbyname text , modifiedon text , owneridname text , parentaccountidname text , Scd_Start_Dt date , Scd_End_Dt date , Etl_Batch_No varchar(50) , Etl_First_Dt timestamp(0) , Etl_Job varchar(50) , Etl_Proc_Dt timestamp(0) , Etl_Tx_Dt timestamp(0) , Src_Sysname varchar(50) , Src_Table varchar(50) ,primary key( accountnumber ) ); COMMENT ON COLUMN p20_pdm.t01_crm_account.accountnumber IS 'accountnumber'; COMMENT ON COLUMN p20_pdm.t01_crm_account.name IS 'name'; COMMENT ON COLUMN p20_pdm.t01_crm_account.tek_channelidname IS 'tek_channelidname'; COMMENT ON COLUMN p20_pdm.t01_crm_account.address1_city IS 'address1_city'; COMMENT ON COLUMN p20_pdm.t01_crm_account.tek_address1_stateidname IS 'tek_address1_stateidname'; COMMENT ON COLUMN p20_pdm.t01_crm_account.tek_address1_countryidname IS 'tek_address1_countryidname'; COMMENT ON COLUMN p20_pdm.t01_crm_account.address1_line1 IS 'address1_line1'; COMMENT ON COLUMN p20_pdm.t01_crm_account.address1_postalcode IS 'address1_postalcode'; COMMENT ON COLUMN p20_pdm.t01_crm_account.tek_accountterritoryidname IS 'tek_accountterritoryidname'; COMMENT ON COLUMN p20_pdm.t01_crm_account.statecodename IS 'statecodename'; COMMENT ON COLUMN p20_pdm.t01_crm_account.tek_omarcustomercode IS 'tek_omarcustomercode'; COMMENT ON COLUMN p20_pdm.t01_crm_account.tek_erpsitenumber IS 'tek_erpsitenumber'; COMMENT ON COLUMN p20_pdm.t01_crm_account.tek_newcountofactivecontacts IS 'tek_newcountofactivecontacts'; COMMENT ON COLUMN p20_pdm.t01_crm_account.tek_countofcases IS 'tek_countofcases'; COMMENT ON COLUMN p20_pdm.t01_crm_account.tek_countofleads IS 'tek_countofleads'; COMMENT ON COLUMN p20_pdm.t01_crm_account.tek_countofopportunities IS 'tek_countofopportunities'; COMMENT ON COLUMN p20_pdm.t01_crm_account.tek_countofnamedaccount IS 'tek_countofnamedaccount'; COMMENT ON COLUMN p20_pdm.t01_crm_account.createdbyname IS 'createdbyname'; COMMENT ON COLUMN p20_pdm.t01_crm_account.createdon IS 'createdon'; COMMENT ON COLUMN p20_pdm.t01_crm_account.tek_3yearvalue IS 'tek_3yearvalue'; COMMENT ON COLUMN p20_pdm.t01_crm_account.tek_3yrordertotal IS 'tek_3yrordertotal'; COMMENT ON COLUMN p20_pdm.t01_crm_account.customertypecodename IS 'customertypecodename'; COMMENT ON COLUMN p20_pdm.t01_crm_account.adx_activeopportunitycount IS 'adx_activeopportunitycount'; COMMENT ON COLUMN p20_pdm.t01_crm_account.donotbulkemail IS 'donotbulkemail'; COMMENT ON COLUMN p20_pdm.t01_crm_account.donotbulkpostalmail IS 'donotbulkpostalmail'; COMMENT ON COLUMN p20_pdm.t01_crm_account.donotemail IS 'donotemail'; COMMENT ON COLUMN p20_pdm.t01_crm_account.donotfax IS 'donotfax'; COMMENT ON COLUMN p20_pdm.t01_crm_account.donotpostalmail IS 'donotpostalmail'; COMMENT ON COLUMN p20_pdm.t01_crm_account.donotphone IS 'donotphone'; COMMENT ON COLUMN p20_pdm.t01_crm_account.ftv_dqphoneclean IS 'ftv_dqphoneclean'; COMMENT ON COLUMN p20_pdm.t01_crm_account.tek_op_duplicatestatusname IS 'tek_op_duplicatestatusname'; COMMENT ON COLUMN p20_pdm.t01_crm_account.tek_plussetupcompletedname IS 'tek_plussetupcompletedname'; COMMENT ON COLUMN p20_pdm.t01_crm_account.tek_customeridname IS 'tek_customeridname'; COMMENT ON COLUMN p20_pdm.t01_crm_account.tek_industryidname IS 'tek_industryidname'; COMMENT ON COLUMN p20_pdm.t01_crm_account.tek_mkto_channel IS 'tek_mkto_channel'; COMMENT ON COLUMN p20_pdm.t01_crm_account.tek_mkto_region IS 'tek_mkto_region'; COMMENT ON COLUMN p20_pdm.t01_crm_account.modifiedbyname IS 'modifiedbyname'; COMMENT ON COLUMN p20_pdm.t01_crm_account.modifiedon IS 'modifiedon'; COMMENT ON COLUMN p20_pdm.t01_crm_account.owneridname IS 'owneridname'; COMMENT ON COLUMN p20_pdm.t01_crm_account.parentaccountidname IS 'parentaccountidname'; COMMENT ON COLUMN p20_pdm.t01_crm_account.Scd_Start_Dt IS '开始时间'; COMMENT ON COLUMN p20_pdm.t01_crm_account.Scd_End_Dt IS '结束时间'; COMMENT ON COLUMN p20_pdm.t01_crm_account.Etl_Batch_No IS '作业批次号'; COMMENT ON COLUMN p20_pdm.t01_crm_account.Etl_First_Dt IS '最初入库时间'; COMMENT ON COLUMN p20_pdm.t01_crm_account.Etl_Job IS '作业名称'; COMMENT ON COLUMN p20_pdm.t01_crm_account.Etl_Proc_Dt IS '本次入库时间'; COMMENT ON COLUMN p20_pdm.t01_crm_account.Etl_Tx_Dt IS '作业运行时间'; COMMENT ON COLUMN p20_pdm.t01_crm_account.Src_Sysname IS '来源系统'; COMMENT ON COLUMN p20_pdm.t01_crm_account.Src_Table IS '来源表'; COMMENT ON TABLE p20_pdm.t01_crm_account IS 'CRM客户账号';