Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Thu, 12 Jul 2007 @ 09:42:58 GMT


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


Subj:   Re: 3706 Syntax error: Data Type does not match a Defined Type name
 
From:   Victor Sokovin

  CHAR_LENGTH worked fine in my SQL. Thanks to all for the quick response.  


Good; but do check the UDF as well. I think the following scenario is possible:

1. Somebody creates a UDF called LENGTH.

2. BTEQ fails because the function has certain requirements on argument data type and those requirements are not met in the statement.

3. ODBC driver translates LENGTH to CHARS before it even checks whether there is a UDF with the same name, so no failures but potentially a different query is being executed. Because the UDF's definition of LENGTH could be something totally different from CHARS.


I don't have time to test all this but I thought the scenario above could actually occur. Your error message does strike me as very different from the usual in such cases vague "incorrect syntax" messages (like "expected something between A and B").


Regards,

Victor



     
  <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: 28 Jun 2020