Skip to content

Execute MSSQL Stored Procedure with Parameters #655

Answered by lovasoa
kevinr432 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, and thank you for reporting this !

The SQL parser inside SQLPage currently does not support stored procedure calls with parameters in sql server. I will report this upstream and we will try to have this implemented.

In the mean time, calling stored procedures without parameters, and user-defined functions works, across all supported databases.

In your example case, you can create a user-defined function:

-- Create the function
CREATE FUNCTION SampleUserDefinedFunction
(
    @input VARCHAR(100)
)
RETURNS VARCHAR(200)
AS
BEGIN
    RETURN 'Your input was: ' + @input
END;

try online

and then use it in a select statement

select dbo.SampleUserDefinedFunction($InputMessage);

try online

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@lovasoa
Comment options

@lovasoa
Comment options

Answer selected by kevinr432
Comment options

You must be logged in to vote
2 replies
@kevinr432
Comment options

@lovasoa
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants