Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Unable to execute Inner join

Hi All,

I have executed the below query and the validation is failed because of Invalid table name. But I have created both the tables Customer and Sales_Order .I have checked the data inthose tables also. But not sure why this error is coming.

SELECT T2."OrderID", T1."CustomerID", T1."CustomerName", T2."Product", T2."Total_Units"

     from "CUSTOMER" AS T1

        INNER JOIN

    "SALES_ORDER" AS T2

        ON T1."CustomerID" = T2."CustomerID";

Error:

Could not execute 'SELECT T2."OrderID", T1."CustomerID", T1."CustomerName", T2."Product", T2."Total_Units" from ...' in 3 ms 270 µs .

SAP DBTech JDBC: [259] (at 145): invalid table name:  Could not find table/view SALES_ORDER in schema XXXX: line 4 col 8 (at pos 145)

Please help me on this.

Tags:
Former Member
replied

       Hi Sreelatha ,

      This is because table SALES_ORDER is not in your schema or table does not exists.

 

      If you don't add the schema name first, then by default hana thinks that table is located in your schema.

      Below query will help, where it is located:

    

      select * from "PUBLIC"."TABLES" WHERE TABLE_NAME = 'SALES_ORDER' ;

    

     Table Name should be like these:

    "BASE_SCHEMA"."DB_ACTIVITY_MAPPING"

     Hope these helps .

         -

      Pratik

.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question