title: ORA - 00972 : identifier too long
body: <p>I am getting error (ORA - 00972 : identifier too long)  while creating the view.</p>
  
  <p>Please find the view statement.</p>
  
  <pre><code>create or replace view ELVW_ATM_REC_HANDOFF_1   
  (Rectype
      ,Recseq
      ,Record_Type
      ,Record_Sequence
      ,MESSAGE_TYPE
      ,PAN
      ,PROCESSING_CODE
      ,TRANSACTION_AMOUNT
      ,TRANSACTION_CURRENCY_CODE
      ,SETTLEMENT_AMOUNT
      ,SETTLEMENT_CURRENCY_CODE
      ,Billing_AMOUNT
      ,Billing_CURRENCY_CODE
      ,Transaction_DATE
      ,Settlement_Date
      ,TRACE
      ,REFERENCE_NUMBER
      ,Switch_Log_ID
      ,AUTHORIZATION_NUMBER
      ,RESPONSE_CODE
      ,Host_Error_Code
      ,TERMINAL_ID
      ,Acceptor_ID
      ,ACQUIRING_INSTITUTION_CODE
      ,REV_FLAG
      ,Original_Trace_Number
      ,From_Account
      ,To_Account) 
  
  as
  select * from    
  
  
  (select 'FT'
      ,'count'
      ,'DT'
      ,rownum
      ,msg_type
      ,pan,proc_code
      ,txn_amt
      ,txn_ccy_code
      ,setl_amt
      ,setl_ccy_code
      ,bill_amt
      ,bill_ccy_code
      ,trans_dt_time
      ,setl_date
      ,stan,trn_ref_no
      ,'iso field 60'
      ,'isofield 38'
      ,resp_code
      ,error_code
      ,term_id
      ,'ISOmessage42'
      ,acq_ins_id
      ,decode(substr(msg_type,1,1),4,reverse(msg_type),msg_type)
      ,'ISOfield90'
      ,from_acc
      ,to_acc 
      from swtb_txn_log)
  </code></pre>
  
  <p>It seems error occurs at the decode function. if i comment it. its working fine. Please find the below code</p>
  
  <pre><code>create or replace view ELVW_ATM_REC_HANDOFF_1(Rectype,Recseq,Record_Type,Record_Sequence,MESSAGE_TYPE,PAN,PROCESSING_CODE,TRANSACTION_AMOUNT,TRANSACTION_CURRENCY_CODE,SETTLEMENT_AMOUNT,SETTLEMENT_CURRENCY_CODE,Billing_AMOUNT,Billing_CURRENCY_CODE,Transaction_DATE,/*Transaction_TIME,*/Settlement_Date,TRACE,REFERENCE_NUMBER,Switch_Log_ID,AUTHORIZATION_NUMBER,RESPONSE_CODE,Host_Error_Code,TERMINAL_ID,Acceptor_ID,ACQUIRING_INSTITUTION_CODE,/*REV_FLAG,*/Original_Trace_Number,From_Account,To_Account) as
  select * from (select 'FT','count','DT',rownum,msg_type,pan,proc_code,txn_amt,txn_ccy_code,setl_amt,setl_ccy_code,bill_amt,bill_ccy_code,trans_dt_time,/*trans_dt_time,*/setl_date,stan,trn_ref_no,'iso field 60',
  'isofield 38',resp_code,error_code,term_id,'ISOmessage42',acq_ins_id,/*decode(substr(msg_type,1,1),4,reverse(msg_type),msg_type),*/'ISOfield90',from_acc,to_acc from swtb_txn_log)
  </code></pre>
  
  <p>I have checked the length of the column name. Its less than 30 characters. Looking forward for your help.</p>