Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

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

1 Solution

Accepted Solutions
MVP
MVP

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

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

2 Replies
MVP
MVP

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

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

reddys310
Honored Contributor II

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

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