What are the challenges you face when working across database platforms? Take the survey
Options

Getting error in SQL Prompt

I ran the SQL server profiler and copied the following query from there and pasted it in SSMS editor. Immediately, the first line of the SP call below was having green squiggly.  

EXEC [sys].[sp_executesql] N'[dbo].[ProcedureName] @parameter1, @parameter2, @parameter3, @parameter4',
                           N'@parameter1 int,@parameter2 int,@parameter3 datetime,@parameter4 datetime',
                           @parameter1 = 1,
                           @parameter2 = 2,
                           @parameter3 = '2019-01-1 00:00:00',
                           @parameter4 = '2019-01-1 00:00:00';

After that I got a warning bulb as shown below (right side). When I click on "use named parameters", I get the error message (left side).




I am not sure what is the expected behaviour here? Is it supposed to automatically fix it? or just notify me?

Answers

Sign In or Register to comment.