All Forums Database
asauber 1 post Joined 03/16
03 Apr 2016
Can't query a table with the table name containing "ALL"

I can't query a table named: CHURN_IBM_TBLS.CHURNSEG_MODEL_INPUT_ALL

 

I'm guessing that Teradata is interpreting the ALL keyword in some way.

 

Even a simple query such as:

select * from churn_ibm_tbls.churnseg_model_input_all

 

Results in:

DatabaseError: (3807, u"[42S02] [Teradata][ODBC Teradata Driver][Teradata Database] Object 'CHURN_IBM_TBLS.CHURNSEG_MODEL_INPUT_JUL' does not exist. ")

 

Where is "JUL" coming from?!

 

If quoted using double quotes:

select * "from churn_ibm_tbls.churnseg_model_input_all"

 

I get a slightly different error (querying other tables with double quotes results in the same error):

DatabaseError: (3807, u"[42S02] [Teradata][ODBC Teradata Driver][Teradata Database] Object 'churn_ibm_tbls.churnseg_model_input_all' does not exist. ")

 

dnoeth 4628 posts Joined 11/04
03 Apr 2016

CHURNSEG_MODEL_INPUT_ALL is a view and one of the base tables doesn't exist (probably a UNION ALL of monthly tables), submit a SHOW VIEW CHURNSEG_MODEL_INPUT_ALL.
 
If you double quote you must quote database and table name induvidually:
"churn_ibm_tbls"."churnseg_model_input_all"

Dieter

You must sign in to leave a comment.