Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Misleading error message

Hi

A QlikView script has failed citing the following error

Error: ErrorSource: Microsoft OLE DB Provider for SQL Server, ErrorMsg: Incorrect syntax near '='

General Script Error

Execution Failed

I have attached the code in a .qvw file

There is no issue with the SQL syntax, and I know this because

1) If I run the SQL statement in Management Studio it works fine

3) If I delete the existing .qvd then the routine works fine (the script uses incremental loading)

Has anyone experienced this type of misleading error message before?

Are there known issues with incremental loading?  If the exisiting .qvd is corrupt or blank for example.

Thanks in advance.

6 Replies
Not applicable
Author

Hi James,

hard to say from here but check:

if the DB is on another server and you have sufficient authorisation on that server and SQL DB with your (QV)user..

hth

F.

Not applicable
Author

Hi Felix

No problems with the DB connection string or the permissions.  I have tested this outside of the incremental load script.

Thanks

James

Not applicable
Author

Hi James,

I see but what I ment is that when starting it as a task(scheduled) from the server you will have the QV-user in place next to your own development user.

good luck

F.

priyalshah9779
Contributor III
Contributor III

Hi

I have faced the issue when we were doing READ and WRITE operation on the same time

Does this help?

Thanks

Priyal

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

It looks like the problem is that the variable vMaxMod does not contain a valid date (in number form) if the QVD exists. Put a TRACE statement in your script like:

TRACE vMaxMod = $(vMaxMod);

before calling your SQL Select to verify that vMaxMod has a valid value. The TRACE statement displays in the reload progress screen and the document log. Alternatively, If you run the script in debug mode, you can check the actual SELECT statement being sent to the server.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
kamielrajaram
Creator III
Creator III

Hi,

Have you tried putting your variable in single quotes

SELECT
*
FROM
TableA
WHERE
ModifiedOn >= '$(vMaxMod)'

Regards

Kamiel