Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
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";

View solution in original post

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

reddy-s
Master II
Master II

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