Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Scripting issue - QV not reading script correctly!?!

LOAD SalesType_Code,
    Sales_Description,
    SalesType,
    GL_Acct;
SQL SELECT *
FROM "FPA_Admin".dbo.SALESTYPE_CODES
WHERE SalesType_Code = "501" or SalesType_Code = "503" or SalesType_Code = "505";

LOAD Svc_Plan As "PMA_ServicePlan",
    Common_Service_Plan,
    Service_Plan,
    Summary AS "Summary_ServicePlan";
SQL SELECT *
FROM "FPA_Admin".dbo.SERVICE_PLAN_CODES;

error message:

Field not found - <SalesType_Code>

SQL SELECT *

FROM "FPA_Admin".dbo.SERVICE_PLAN_CODES

Issue:  The error appears to suggest that script is not being read by QV correctly,

due to the field not matching the table in the SQL SELECT table.

any suggestions????

1 Solution

Accepted Solutions

Re: Scripting issue - QV not reading script correctly!?!

HI

In sql, we give single quotes

WHERE SalesType_Code = '501' or SalesType_Code = '503' or SalesType_Code = '505';

5 Replies

Re: Scripting issue - QV not reading script correctly!?!

Hi

Do u have field SalesType_Code in your database.

If so,

Try like this

LOAD SalesType_Code,

    Sales_Description,

    SalesType,

    GL_Acct,

SalesType_Code where match(SalesType_Code ,501,503,505);

SQL SELECT *

FROM "FPA_Admin".dbo.SALESTYPE_CODES;

Not applicable

Re: Scripting issue - QV not reading script correctly!?!

Didn't work, same error

What works:

LOAD SalesType_Code,

    Sales_Description,

    SalesType,

    GL_Acct;

SQL SELECT *

FROM "FPA_Admin".dbo.SALESTYPE_CODES;

What doesn't work wit the SQL WHERE CLAUSE.

LOAD SalesType_Code,

    Sales_Description,

    SalesType,

    GL_Acct;

SQL SELECT *

FROM "FPA_Admin".dbo.SALESTYPE_CODES

WHERE SalesType_Code = "501" or SalesType_Code = "503" or SalesType_Code = "505";

Question is "What is the syntax for a correct WHERE CLAUSE? with OR operator and text fields?

thanks. .

T L

Re: Scripting issue - QV not reading script correctly!?!

HI

In sql, we give single quotes

WHERE SalesType_Code = '501' or SalesType_Code = '503' or SalesType_Code = '505';

Not applicable

Re: Scripting issue - QV not reading script correctly!?!

Thank you!

Note to self: "I am an idiot!"

Re: Scripting issue - QV not reading script correctly!?!

Hi sportsgirl

Everyone do small mistake..

Community Browser