![]() |
|
Archives of the TeradataForumMessage Posted: Tue, 27 Nov 2001 @ 17:18:22 GMT
Using Queryman, if I submit the following ODBC-compliant statement:
SELECT DISTINCT {fn YEAR(Intermodal_Test_DB.t.a)} As Level1_
, {fn QUARTER(Intermodal_Test_DB.t.a)} As Level2_
, {fn MONTH(Intermodal_Test_DB.t.a)} As Level3_
, Intermodal_Test_DB.t.a As
Level4_ FROM Intermodal_Test_DB.t;
I get the error: [NCR][Teradata RDBMS] Syntax error: expected something between the 'DISTINCT' keyword and the end of the request. (-3706) However, if I use Microsoft's ODBC test harness (odbcte32.exe) and execute the same query using the ODBC SQLExecDirect() call, the query executes and returns the following: "Level1_", "Level2_", "Level3_", "Level4_" 2001, 4, 11, 2001-11-27 1 row fetched from 4 columns. Why the difference in behavior? The table 't' is defined as:
CREATE SET TABLE INTERMODAL_TEST_DB.t ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL
(
a DATE FORMAT 'yyyy-mm-dd',
b TIMESTAMP(6))
PRIMARY INDEX ( a );
With one row: insert INTERMODAL_TEST_DB.t values (current_date, current_timestamp(6));
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||