Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 23 Jun 2015 @ 15:44:42 GMT


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


Subj:   Re: Concatenate Sqltextinfo in dbc.dbqlsqltbl
 
From:   Frydryszak, Marek

You can bypass the problem with clob in union by:

     lock row access
     select procid, queryid,
            cast( max(case when sqlrowno=1 then sqltextinfo  else '' end) as clob(250000) )  ||
             max(case when sqlrowno=2 then sqltextinfo else '' end) ||
             max(case when sqlrowno=3 then sqltextinfo else '' end) ||
             max(case when sqlrowno=4 then sqltextinfo else '' end) ||
             max(case when sqlrowno=5 then sqltextinfo else '' end) ||
             max(case when sqlrowno=6 then sqltextinfo else '' end) ||
             max(case when sqlrowno=7 then sqltextinfo else '' end) ||
             max(case when sqlrowno=8 then sqltextinfo else '' end) ||
             max(case when sqlrowno=9 then sqltextinfo else '' end)
             as fullsql
      from   dbc.dbqlsqltbl
      where cast(collecttimestamp as date)  = current_date group by 1,2

First check the max of sqlrowno and - if >9 - modify the query



     
  <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