Archives of the TeradataForum
Message Posted: Tue, 19 Dec 2006 @ 11:45:56 GMT
<-- Anonymously Posted: Tuesday, December 19, 2006 06:01 -->
I observed a strange error as follows:
I have two databases db1 and db2. There is table 'table1' in both the databases(with same name). If I set one of the databases say db1 to default database as follows:
And now I execute following query :
select * from db1.table1 a cross join table1 b ;
This query will execute without any error.
When I execute the following query :
select * from db2.table1 a cross join table1 b;
This statement will give following error message:
"3806: Table/view/trigger name 'table1' is ambiguous"
I think it is happening because there is some functionality error in teradata. So whenever we hardcode the database name (different than default database) in SQL statement then parser looks for the next table in FROM clause in both the databases( hardcoded as well as default database). This confuses the parser and it produces the above error.
Can you throw some light on my above observation.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 15 Jun 2023|