In this post I will explain why you encountered an error [ Teradata Error 3854 SQLState HY000 ] [Error 3854] [SQLState HY000] <your object name> is not a view while executing the DDL query at Teradata, what caused the problem and how to resolve it.
The error code 3854 occurs when you try execute SQL query appropraite to the view, but the name of the object that you used – is not a view. It means that at the current database exists table or macro with the same name.
For example, if at the current database exists table with name TUT_EMPLOYEE and you try execute query like below, you get the 3854 error code.
REPLACE VIEW TUT_EMPLOYEE ( <list of attributes> ) AS SELECT <list of attributes> FROM <table name>;
Checking Object Type in Teradata
After getting 3854 error code, check if the object which you referred is the view. You can verify it using the below query:
SELECT * FROM DBC.TABLES WHERE DATABASENAME ='<your database name>' AND TABLEKIND ='V' ;
That’s all. I hope that it help you! 🙂
If you enjoyed this post please add the comment below and share this post on your Facebook, Twitter, LinkedIn or another social media webpage.
Thanks in advanced!