How to Execute SQL Server Stored Procedure in SQL Developer

0 votes

I have been given access to a SQL Server database with a user account that can only run stored procedures. I added the JTDS SQL Server JDBC jar file as a Third Party JDBC driver in SQL Developer. I can access the SQL Server database with no problems. I was given the following syntax to use while executing the process:

EXEC proc_name 'paramValue1' 'paramValue2'

When I run this as either a statement or a script, I get this error:

Error starting at line 1 in command:
EXEC proc_name 'paramValue1' 'paramValue2'
Error report:
Incorrect syntax near the keyword 'BEGIN'.

I attempted to enclose the statement in BEGIN/END but still received the same issue. Is it possible to use SQL Developer to call the procedure? What syntax must I use if that is the case?

Sep 14, 2022 in Database by Kithuzzz
• 38,010 points
1,641 views

1 answer to this question.

0 votes

You don't need EXEC clause. Simply use:

proc_name paramValue1, paramValue2

I hope this helps you.

answered Sep 16, 2022 by narikkadan
• 63,420 points

Related Questions In Database

0 votes
0 answers

What is the syntax to drop a Stored Procedure in SQL Server 2000?

In SQL Server 2000, how do you ...READ MORE

Aug 25, 2022 in Database by Kithuzzz
• 38,010 points
377 views
0 votes
1 answer

How to delete duplicate rows in SQL Server?

CTEs and ROW_NUMBER can be combined together which will ...READ MORE

answered Feb 10, 2022 in Database by Vaani
• 7,020 points
565 views
0 votes
0 answers

How to update Identity Column in SQL Server?

With 200 records currently, I want to ...READ MORE

Aug 9, 2022 in Database by Kithuzzz
• 38,010 points
1,059 views
0 votes
0 answers

How to ALTER multiple columns at once in SQL Server

ALTER the data types of several columns in ...READ MORE

Aug 12, 2022 in Database by Kithuzzz
• 38,010 points
2,174 views
0 votes
1 answer

What is a stored procedure?

A stored procedure is a set of ...READ MORE

answered Feb 4, 2022 in Database by Neha
• 9,060 points
786 views
0 votes
1 answer

Function vs. Stored Procedure in SQL Server

Functions are calculated values that cannot make ...READ MORE

answered Feb 17, 2022 in Database by Neha
• 9,060 points

edited Feb 17, 2022 by Neha 18,227 views
0 votes
0 answers

What is a stored procedure?

119 What is a "stored procedure" , how do they work? What ...READ MORE

May 27, 2022 in Others by avinash
• 1,840 points
342 views
0 votes
0 answers

SQL Server: Invalid Column Name

I am in the process of changing ...READ MORE

Aug 19, 2022 in Database by Kithuzzz
• 38,010 points
1,102 views
0 votes
1 answer

How to execute function in SQL Server 2008

The function appears not to be being ...READ MORE

answered Sep 11, 2022 in Database by narikkadan
• 63,420 points
676 views
0 votes
1 answer

How to extract only the year from the date in sql server 2008?

To obtain the year from the given ...READ MORE

answered Sep 15, 2022 in Database by narikkadan
• 63,420 points
482 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP