2 Replies Latest reply: Dec 10, 2015 1:12 PM by Sangram Reddy RSS

    i keep getting an error in the script when trying to load new table

      I am trying to load data from a new table and i keep getting an error in the script. it underlines the SELECT "Work Orders" portion but everything looks correct to me.  Any ideas on what is causing the error? Below I have copied the script:

       

      LIB CONNECT TO 'DB';

      LOAD "Work Order Number (wo)" & Region & "Country Code (wo)" AS Key,
      // "Work Order Number (wo)",
      //     Region,
      //     "Country Code (wo)",
          "Visit Count (act)",
      //     "YYYY/MM",
      //     "WO Type (wo)";
      SQL SELECT "Work Order Number (wo)",
          Region,
          "Country Code (wo)",
          "Visit Count (act)",
          "YYYY/MM",
          "WO Type (wo)"
      FROM DB.dbo."WO_G";

        • Re: i keep getting an error in the script when trying to load new table
          Sunny Talwar

          Everything except the LOAD line and "Visit Count (act)" seems to be commented out. If that is true you would need a semi-colon after "Visit Count (act)" instead of a comma because that ends your load at that line.

           

          LIB CONNECT TO 'DB';

          LOAD "Work Order Number (wo)" & Region & "Country Code (wo)" AS Key,
          // "Work Order Number (wo)",
          //    Region,
          //    "Country Code (wo)",
              "Visit Count (act)";
          //    "YYYY/MM",
          //    "WO Type (wo)";
          SQL SELECT "Work Order Number (wo)",
              Region,
              "Country Code (wo)",
              "Visit Count (act)",
              "YYYY/MM",
              "WO Type (wo)"
          FROM DB.dbo."WO_G";

          • Re: i keep getting an error in the script when trying to load new table
            Sangram Reddy

            Hi Sam,

             

            Place a semicolon after "Visit Count (act)" instead of a comma as you have commented out the last field which has a semicolon.

             

            LIB CONNECT TO 'DB';

            LOAD "Work Order Number (wo)" & Region & "Country Code (wo)" AS Key,
            // "Work Order Number (wo)",
            //     Region,
            //     "Country Code (wo)",
                "Visit Count (act)";
            //     "YYYY/MM",
            //     "WO Type (wo)";
            SQL SELECT "Work Order Number (wo)",
                Region,
                "Country Code (wo)",
                "Visit Count (act)",
                "YYYY/MM",
                "WO Type (wo)"
            FROM DB.dbo."WO_G";