|
Archives of the TeradataForumMessage Posted: Sun, 14 Aug 2005 @ 18:42:28 GMT
> BTEQ -- Enter your DBC/SQL request or BTEQ command: > > select DAYOFWEEK('2005-08-12'); > *** Failure 3706 Syntax error: expected something between '(' and the > string '2'. > Statement# 1, Info =31 > *** Total elapsed time was 1 second. DAYOFWEEK is a so called ODBC function. In SQLA (=Queryman), the query is translated by the ODBC driver to Teradata native SQL. The driver is aware of the function, so everything is fine (and transparent to the user). BTEQ does not use ODBC and it is not aware of ODBC functions. Error 3706. To submit your statement via BTEQ you'll have to rewrite it to native SQL. I have two suggestions which do not involve the system calendar. 1. Enable ODBC logging and search for the translated SQL. Perhaps it's all you need. 2. Use something like select This will give you day names rather than numbers. You'll have to do the translation using CASE or something like that. Regards, Victor
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | |||||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | |||||||||||||||||||||||||||||||||||||||||||||||||||