[SOLVED] Teradata: [Error 3854] [SQLState HY000] <your object name> is not a view.

[SOLVED] Teradata: [Error 3854] [SQLState HY000] <your object name> is not a view.

In this post I will explain why you encountered an error [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.

Problem

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

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' ;

If you enjoyed this post please add the comment below or share this post on your Facebook, Twitter, LinkedIn or another social media webpage.
Thanks in advanced!

Leave a Reply

avatar
  Subscribe  
Notify of
Close Menu