Syntax error for 'Select'

Database

Syntax error for 'Select'

Hi All,

I am using Teradata Studio 14.10.

While trying to run below query, I keep getting the error: SQL Editor: Syntax Error at line 1, column 1. Encountered SELECT.

Is there something wrong with my query? Appreciate any advice.

Thanks.

SELECT

  Artemis.REPAIR_OR_REPLACE.Notif_Id,

  Artemis.REPAIR_OR_REPLACE.Dispatch_Id,

  Artemis.REPAIR_OR_REPLACE.Requote_Extn_Ind,

  Artemis.APC_COUNTRY.Country_Short_Desc,

  Artemis.COMMODITY_PART_MAINT.Commodity_Cd,

  Artemis.REPAIR_OR_REPLACE.KBB_Rcvd_Ts,

  Artemis.REPAIR_OR_REPLACE.KGB_Shpd_Ts,

  Artemis.COMMODITY_PART_MAINT.Part_Desc,

  Artemis.REPAIR_OR_REPLACE.SCOM_Status_Dt,

  Artemis.COMMODITY_PART_MAINT.Commodity_Desc,

  SOLDTO_CUSTOMER_EXTD.Cust_Id,

  SOLDTO_CUSTOMER_EXTD.Cust_Name,

  SHIPTO_CUSTOMER_EXTD.Cust_Id,

  SHIPTO_CUSTOMER_EXTD.Cust_Name,

  Artemis.NOTIFICATION_TYPE_TEXT.Notif_Type_Cd,

  trim(Artemis.Channel_Type.Priority_Type_Cd)||'('||trim(Artemis.Channel_Type.Priority_Cd)||')',

  Artemis.Channel_Type.CHANNEL_TYPE,

  Artemis.DN_SERVICE_NOTIFICATION_HDR.Header_Cs_Cd,

  Artemis.SALES_ORG_REGION.Sales_org_Cd,

  Artemis.DN_SERVICE_NOTIFICATION_HDR.Repair_Cancelled_Ind,

  Artemis.FISCAL_CALENDAR.Fiscal_Dt,

  Artemis.ALTERNATE_HIERARCHY.Hier_Node_Id,

  Artemis.NOTIF_ITEM.Notif_Item_Nr,

  Artemis.SERVICE_NOTIFICATION_ITEM.Comptia_Cd,

  Artemis.NOTIFICATION_STATUS.Internal_Status_Cd

FROM

  Artemis.Channel_Type INNER JOIN Artemis.REPAIR_OR_REPLACE ON (Artemis.REPAIR_OR_REPLACE.Notif_Type_Cd=Artemis.Channel_Type.Priority_Type_Cd  AND  Artemis.REPAIR_OR_REPLACE.Repair_Scenario_Cd=Artemis.Channel_Type.Priority_Cd)

   INNER JOIN Artemis.NOTIFICATION_STATUS ON (Artemis.NOTIFICATION_STATUS.Internal_Status_Cd=Artemis.REPAIR_OR_REPLACE.INTERNAL_STATUS_CD  AND  Artemis.REPAIR_OR_REPLACE.Notif_Type_Cd=Artemis.NOTIFICATION_STATUS.Notif_Type_Cd)

   LEFT OUTER JOIN Artemis.CUSTOMER_EXTD  SHIPTO_CUSTOMER_EXTD ON (SHIPTO_CUSTOMER_EXTD.Sales_Org_Cd=Artemis.REPAIR_OR_REPLACE.Sales_Org_Cd and SHIPTO_CUSTOMER_EXTD.Cust_Id=Artemis.REPAIR_OR_REPLACE.Ship_To_Cust_Id)

   INNER JOIN Artemis.FISCAL_CALENDAR ON (Artemis.FISCAL_CALENDAR.Fiscal_Dt=Artemis.REPAIR_OR_REPLACE.Notif_Dt)

   LEFT OUTER JOIN Artemis.CUSTOMER_EXTD  SOLDTO_CUSTOMER_EXTD ON (SOLDTO_CUSTOMER_EXTD.Sales_Org_Cd=Artemis.REPAIR_OR_REPLACE.Sales_Org_Cd and SOLDTO_CUSTOMER_EXTD.Cust_Id=Artemis.REPAIR_OR_REPLACE.Sold_To_Cust_Id)

   INNER JOIN Artemis.NOTIFICATION_TYPE_TEXT ON (Artemis.NOTIFICATION_TYPE_TEXT.Notif_Type_Cd=Artemis.REPAIR_OR_REPLACE.Notif_Type_Cd)

   INNER JOIN Artemis.DN_SERVICE_NOTIFICATION_HDR ON (Artemis.REPAIR_OR_REPLACE.Notif_Id=Artemis.DN_SERVICE_NOTIFICATION_HDR.Notif_Id)

   LEFT OUTER JOIN Artemis.APC_COUNTRY ON (Artemis.APC_COUNTRY.Country_Cd=Artemis.REPAIR_OR_REPLACE.Country_Cd)

   LEFT OUTER JOIN Artemis.ALTERNATE_HIERARCHY ON (Artemis.ALTERNATE_HIERARCHY.Hier_Node_Id=Artemis.REPAIR_OR_REPLACE.Fin_Org_ID)

   INNER JOIN Artemis.NOTIF_ITEM_ACTIVITY ON (Artemis.NOTIF_ITEM_ACTIVITY.Notif_Id=Artemis.REPAIR_OR_REPLACE.Notif_Id)

   LEFT OUTER JOIN Artemis.NOTIF_ITEM ON (Artemis.NOTIF_ITEM_ACTIVITY.Notif_Id=Artemis.NOTIF_ITEM.Notif_Id and Artemis.NOTIF_ITEM_ACTIVITY.Notif_Item_Nr=Artemis.NOTIF_ITEM.Notif_Item_Nr)

   INNER JOIN Artemis.COMMODITY_PART_MAINT ON (Artemis.NOTIF_ITEM.Part_Id=Artemis.COMMODITY_PART_MAINT.Part_Id)

   LEFT OUTER JOIN Artemis.SERVICE_NOTIFICATION_ITEM ON (Artemis.NOTIF_ITEM.Notif_Id=Artemis.SERVICE_NOTIFICATION_ITEM.Notif_Id and Artemis.NOTIF_ITEM.Notif_Item_Nr=Artemis.SERVICE_NOTIFICATION_ITEM.Notif_Item_Nr)

   LEFT OUTER JOIN Artemis.SALES_ORG_REGION ON (Artemis.SALES_ORG_REGION.Sales_Org_Cd=Artemis.REPAIR_OR_REPLACE.Sales_Org_Cd)

  

WHERE

   Artemis.SALES_ORG_REGION.Sales_org_Cd  IN  ( '1489'  )

   AND

   Artemis.FISCAL_CALENDAR.Fiscal_Dt  >=  {ts '2016-01-01 00:00:00'};