Search code examples
databaseindexingsyntax-errordatabase-migrationteradata

How to load Indexes to Teradata Server using BTEQ


I'm trying to load table that has unique index to Teradata Server using BTEQ utility. And I get the following error: Failure 3706 Syntax Error: expecting something between the word 'ID' and the 'ASC' keyword. It seems like BTEQ doesn't accept 'ASC' and 'DESC' keywords. However the syntax is valid, and if I run this in Teradata Studio it works, index is created.

CREATE UNIQUE INDEX IDX_UNIQUE_TEST_INDEX

(ID ASC) ON TEST_INDEX;

Could anyone please help me to find a solution. Any help is deeply appreciated.


Solution

  • As there's no ASC or DESC in any Teradata index Teradata Studio probably removes it before running the query :-)

    You might check DBQL what's actually submitted.