SingleStore Execute Immediate a SP/Func inside SP from a query table

All we need is an easy explanation of the problem, so here it is.

I’m having trouble to execute immediate a SP inside a SP from a table.
because i have a lot of SP stored in a table (as a data/string).

in oracle we can use “select sp_1(:1,:2) from dual”
and running it via execute immediate. how’s singlestore do that? i get error.

please help, because we want to migrate from oracle to singlestore. i changed a lot of SP from oracle to singlestore. thanks.

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

Use “CALL spName(args)” and have the SP include in it’s parent body (usually as the last statement) and ECHO SELECT …; statement

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply