Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SQL Error when Loading a qvd from qvw

Hi ,

I am a qlikview novice and I would need your suggestion.In one of our reports. We are using a qvw file which internally creates a temporary table and then inserts the records of the temp table into a sales table.

When I execute the load ,the load happens for sometimes and then an error pops up which says

"SQL State:07002,Errorcode:32, ErrorMsg: The # of binded parameters <the # of the parameters markers

The interesting part is when I change the database connection from production to quality and development , the load happens properly. I am not sure why this is happening only in production environment.

Any help in this matter would be appreciated.

Thanks,

Abhay

14 Replies
Not applicable
Author

Thanks Jagan. I am getting "Access to this place or content is restricted." when I click on this link.

Thanks,

Abhay

Anonymous
Not applicable
Author

Inserting records into Database using Qlikview Script

Hi, this is the details in that link check the below

============================

The below script helps to insert data from Qlikview to Database using Script.

//Connection Sring

ODBC Connect to trDatabase;

//Load Data from Excel file

TABLE:

LOAD transaction_date,

     location,

     item,

     site

FROM

[Data.xlsx]

(ooxml, embedded labels, table is Sheet1);

// Getting number of records in Table

LET V_ROWS = NoOfRows('TABLE');

// Loop through the records and insert into Database table

FOR V_ROW = 0 TO V_ROWS - 1

LET V_FIELD1 = Peek('transaction_date',V_ROW);

LET V_FIELD2 = Peek('location',V_ROW);

LET V_FIELD3 = Peek('item',V_ROW);

LET V_FIELD4 = Peek('site',V_ROW);

SQL INSERT INTO dbo.temp_Table(transaction_date, location,item, site) VALUES('$(V_FIELD1)','$(V_FIELD2)', '$(V_FIELD3)','$(V_FIELD4)');

NEXT;

Regards,

Jagan.

djsampat
Creator II
Creator II

If it works in Quality and Development, then it may be an access issue. Check your SQL security access.

Is the user you used on the Q&D database granted access to the Production DB?

If this helped you, please mark as Helpful. If it solves your issue, please mark as Answer

If you are viewing this topic and found it informative, please like my comment.

Regards

Dhruv

Not applicable
Author

Hi Abhay,

You may check two things here.

1) What is the "user-name" your QV app has, when it strikes the Production Database? (You my change the pointer to Dev or QA DB where I assume you should have the read access to system views and from there get the user-name. Because it might be possible that the user-id with which you are connecting to QA or DEV, through QV app, is a Unique ID and not a generic one, thus have a different privilege)

2) Then once you get that "QV user", please find if it has privilege to create tables in Production DB

Thanks.

Not applicable
Author

Just a guess but your SQL command isn't "just" a select statement. You are telling your database to create  TEMPORARY table with the results of your select command. To read the data into QlikView simply remove the extra "sql create temp table Nirvana_Cancel as" and just go with the "sql .. select Extract..."