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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Unable to execute the stored procedure in qlik view

SET ThousandSep=',';

SET DecimalSep='.';

SET MoneyThousandSep=',';

SET MoneyDecimalSep='.';

SET MoneyFormat='$#,##0.00;($#,##0.00)';

SET TimeFormat='h:mm:ss TT';

SET DateFormat='M/D/YYYY';

SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';

SET LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';

SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';

SET FirstWeekDay=6;

SET BrokenWeeks=1;

SET ReferenceDay=0;

SET FirstMonthOfYear=1;

SET CollationLocale='en-US';

OLEDB CONNECT TO [Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=AdventureWorks2008R2;Data Source=IB-SEZ-PC-089\SQL2008R2;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=IB-SEZ-PC-089;Use Encryption for Data=False;Tag with column collation when possible=False];

SQL EXECUTE TEST('EM');

TEST as the procedure name,

EM as parameter.

Error:

ErrorSource: Microsoft OLE DB Provider for SQL Server, ErrorMsg: Incorrect syntax near 'EM'.

SQL EXECUTE TEST('EM')

i am getting the above error can any one help me in that. i was search the this blog only to execute the procedure, i have done what ever they mentioned but still am getting the error. pleas help i am new to this report .

9 Replies
Not applicable
Author

i am using sql server2008r2

awhitfield
Partner - Champion
Partner - Champion

Does the procedure execute in the format you have supplied in Management studio?

Andy

flipside
Partner - Specialist II
Partner - Specialist II

Have you tried without the brackets, or in format EXECUTE TEST @{parameter} = 'EM' ?

Not applicable
Author

when i tryed using EXECUTE TEST 'EM'; then its wokring fine now thanks flipside

and can you tel me how to insert the image and backgroud  image as well i am trying to insert, what are the image format for that.

Anil_Babu_Samineni

How about this

Load * ;

Sql

Declare @out int

Declare @out1 int

Exec LMS.dbo.Sp_TestQlikview 1,7,@out Output,@out1 Output

Select @out as Output, @out1 as Output1;

For Sql Server it is working.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
jonathandienst
Partner - Champion III
Partner - Champion III

'EM' will be as text string containing 2 characters. Is that the correct data type for the SP?

I normally uses something like:

     SQL EXEC 'EM';

Try the exact text in SQL MS:

     EXEC 'EM'

Does that run correctly and return a record set?C

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

yes jonathan, actuvaly i have created one small SP to run in Qlikview, it has varchar data type

@PersonType varchar(5)   (this is what i have)

Not applicable
Author

after enble this option i am able to run the Stored procedure is that correctEnable.png