Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Jagveer
Contributor III
Contributor III

Stored procedure error while passing date parameter

Hi,

I have a stored procedure in SAP HANA DB that i am trying to call in qlikview. i need to pass a date parameter to the procedure but can't seem to find the right syntax.  the procedure ahas 3 different select statements

below is the syntax i am using

ODBC CONNECT TO [SAP HANA - PRD] (XUserId is NcbOPBdKVaUKEJNZ, XPassword is LRZVKNFLZbSKGEVGGSaMDGRMHLQeUQC);

SQL call Sales_QTR('05/09/2019');

this is the error i am getting

General error;303 invalid DATE, TIME or TIMESTAMP value: Error while parsing 05/09/2019 as DATE at function __typecast__() (at pos 24)

I have also tried using a date variable and then passing it as parameter, it doesn't allow using a variable for parameter call

Please help.

1 Solution

Accepted Solutions
Jagveer
Contributor III
Contributor III
Author

Thanks for the idea Trey. this format did not work but i passed the date format on SAP server 'yyyymmdd' which worked.

Cheers!!

View solution in original post

3 Replies
treysmithdev
Partner Ambassador
Partner Ambassador

SAP HANA's default date format is YYYY-MM-DD, I would try to pass the date as such.

 

SQL call Sales_QTR('2019-09-05');
Blog: WhereClause   Twitter: @treysmithdev
Brett_Bleess
Former Employee
Former Employee

Jagveer, did Trey's suggestion work for you?  If so, please be sure to give him credit by using the Accept as Solution button on his post to mark that as the solution, this will also let others know this worked.  I would probably suggest checking out the SAP Community on this one as well given you may be more likely to get further answers there versus our forums.  Just another idea in case you are still trying to get things to work.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
Jagveer
Contributor III
Contributor III
Author

Thanks for the idea Trey. this format did not work but i passed the date format on SAP server 'yyyymmdd' which worked.

Cheers!!