Quantcast
Channel: Solved » sql-server
Viewing all articles
Browse latest Browse all 48

How to Execute Sql Server Stored Procedure in Sql Developer

$
0
0

I’ve been given a user account to a SQL Server database that only has privileges to execute a stored procedure. I added the JTDS SQL Server JDBC jar file to SQL Developer and added it as a Third Party JDBC driver. I can successfully log in to the SQL Server database. I was given this syntax for running the procedure:

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 tried wrapping the statement in BEGIN/END, but get the same error. Is it possible to call the procedure from SQL Developer? If so, what syntax do I need to use?

Solution

You don’t need EXEC clause. Simply use

proc_name paramValue1, paramValue2

(and you need commas as Misnomer mentioned)

Related

The post How to Execute Sql Server Stored Procedure in Sql Developer appeared first on Solved.


Viewing all articles
Browse latest Browse all 48

Latest Images

Trending Articles



Latest Images