Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 02 Sep 2003 @ 12:58:54 GMT


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


Subj:   BTEQ error
 
From:   Ferry, Craig

I am able to run the following query in queryman with no errors.

SELECT CAST(SUBSTRING(AccountName,7,2)||'/'||
SUBSTRING(AccountName, 9,2)||'/'||
SUBSTRING(AccountName, 11,2) AS DATE FORMAT 'YY/MM/DD'),
SUBSTRING(AccountName, 13,2) AS TheHour,
UserName,
SUM(CpuTime) AS CpuTime,
SUM(DiskIO) AS DiskIO
FROM dbc.ampusage
WHERE SUBSTRING(AccountName,7,2) = substring(date - 35,3,2)
AND SUBSTRING(AccountName,9,2) = substring(date - 35,6,2)
GROUP BY 1,2,3;

When I try to run it in bteq, I receive the following error. Does anyone know why this may be happening?

 *** Failure 3706 Syntax error: expected something between the word 'Account  Name' and ','.
                Statement# 1, Info =74
 *** Total elapsed time was 1 second.

Thanks



     
  <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