Stored Proc

When I execute a SP in Metabase like

Exec SP_0129_AG089_v2 @Param1= ‘01’
,@Param2 = ‘03’

metabase shows results and we can visualise this. But when we wan’t to ask a question based on the saved question above, we cannot perform this and metabase tells us that there is an error ‘Incorrect syntax near the keyword ‘exec’.’

What could be wrong?

Hi @wotikar, have you tried this:

hi @Luiggi

I read the post you suggested. This is still not working for me. Metabase tells me there is a incorrect syntax near exec. The question is bases on a stored proc in MS SQL. When I run this, de question shows me the result of the SP. When I want wo use MB to create a new question based on this question, it tells me “Incorrect syntax near…”. This apprears with and without SP 's that have parameters.

Could nog find any info that can help me further…

Thanks, the new questions you tried to build where using the GUI or plain SQL?

Hi @Luiggi,

I used SQL for this to created the stored proc. I used “custom question” to build the subquery.

@wotikar Please post “Diagnostic Info” from Admin > Troubleshooting, and which version of MSSQL.
And when you see the “Incorrect syntax near…” error, then there should be a detailed error in Admin > Troubleshooting > Logs.

Hi, I am new on metabase, is there any solution for this case? I have the same issue:
"ERROR metabase.query-processor.middleware.catch-exceptions Erro ao processar a consulta: Incorrect syntax near the keyword 'EXEC'."

There’s some error clearly in the syntax

Hi, there is not any syntax error, the proc runs normaly, but when I trie to create some question this error appears.

Please post all diagnostic info and an example