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 in Database by Kithuzzz
• 12,240 points
41 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 by narikkadan
• 20,880 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 in Database by Kithuzzz
• 12,240 points
45 views
0 votes
0 answers

How to execute function in SQL Server 2008

I created a function and tried to ...READ MORE

Sep 10 in Database by Kithuzzz
• 12,240 points
23 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 in Database by Vaani
• 7,020 points
108 views
0 votes
0 answers

How to update Identity Column in SQL Server?

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

Aug 9 in Database by Kithuzzz
• 12,240 points
176 views
0 votes
1 answer

What is a stored procedure?

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

answered Feb 4 in Database by Neha
• 8,920 points
216 views
0 votes
1 answer

Function vs. Stored Procedure in SQL Server

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

answered Feb 17 in Database by Neha
• 8,920 points

edited Feb 17 by Neha 460 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 in Others by avinash
• 1,840 points
36 views
0 votes
0 answers

SQL Server: Invalid Column Name

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

Aug 19 in Database by Kithuzzz
• 12,240 points
117 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 in Database by narikkadan
• 20,880 points
46 views
0 votes
1 answer

How to add a Try/Catch to SQL Stored Procedure

See TRY...CATCH (Transact-SQL) CREATE PROCEDURE [dbo].[PL_GEN_PROVN_NO1] ...READ MORE

answered Sep 16 in Database by narikkadan
• 20,880 points
20 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