SAP Knowledge Base Article - Preview

2262635 - Error: Incorrect syntax near the keyword 'CONVERT' when calling a stored procedure with a date type variable in SQL transform - Data Services 4.2

Symptom

  • A SQL Server stored procedure is created with a date type of input parameter.  For example,
    CREATE PROCEDURE [dbo].[sp_test1] (
    @inpLoad_Dte DATE
    )
    AS
    ... ...
  • Use the following statement to call the stored procedure in SQL transform and give it with a date/datatime type variable ($inpDate) as the input parameter:
    exec dbo.sp_test1 {$inpDate}
  • When executing the job, getting the following error:
    SQL submitted to ODBC data source <localhost> resulted in error <[Microsoft][SQL Server Native Client 11.0][SQL Server]Incorrect syntax near the keyword 'CONVERT'.>. The SQL submitted is <EXEC dbo.sp_test1 CONVERT(DATE, '2015-11-01', 120)>.


Read more...

Environment

  • Data Services 4.2
  • Microsoft SQL Server 2012

Product

SAP Data Services 4.2

Keywords

DS, CONVERT, SP, Stored Procedure, Date, SQL transform, incorrect syntax  , KBA , EIM-DS-EXE , Job Execution , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.