Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
MayilVahanan

HI

In sql, we give single quotes

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

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

5 Replies
MayilVahanan

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;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

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

MayilVahanan

HI

In sql, we give single quotes

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

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Thank you!

Note to self: "I am an idiot!"

MayilVahanan

Hi sportsgirl

Everyone do small mistake..

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.