# Need the ability to query directly from a SP

**URL:** <https://www.singlestore.com/forum/t/need-the-ability-to-query-directly-from-a-sp/2955>\
**Category:** Feedback\
**Created:** [April 27, 2021, 3:56pm UTC](https://www.singlestore.com/forum/t/need-the-ability-to-query-directly-from-a-sp/2955 "2021-04-27T15:56:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![franklw](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/f/ac91a4/32.png) [@franklw](https://www.singlestore.com/forum/u/franklw)\
**Post date:** [April 27, 2021, 3:56pm UTC](https://www.singlestore.com/forum/t/need-the-ability-to-query-directly-from-a-sp/2955/1 "2021-04-27T15:56:38Z")

</div>

We are migrating from Sybase IQ to Memsql and one of the features we are missing is running a select statement on a SP

Eg: Select \* from SP\_LOANS();

This will help us significantly for the users to have more control on writing the encapsulated queries considering Memsql do not have the anonymous SQL feature.  
We cannot use TVF because of the limitations it has of having one select statement.

---

<div class="post-metadata">

**Author:** ![hanson](https://www.singlestore.com/forum/user_avatar/www.singlestore.com/hanson/32/196_2.png) [@hanson](https://www.singlestore.com/forum/u/hanson)\
**Post date:** [May 5, 2021, 12:46am UTC](https://www.singlestore.com/forum/t/need-the-ability-to-query-directly-from-a-sp/2955/2 "2021-05-05T00:46:51Z")

</div>

Would the SP return a query type value (QTV)?

And if we gave you multi-statement TVFs (that could have bodies similar to an SP) would that meet your needs?

Tell us a bit about what SP\_LOANS() would look like in your case, if you don’t mind. E.g. can you show sample source code?

And if you are using exactly this in Sybase IQ, if you can post a link to the Sybase IQ documentation page for the feature, that’d be great.

---

<div class="post-metadata">

**Author:** ![hanson](https://www.singlestore.com/forum/user_avatar/www.singlestore.com/hanson/32/196_2.png) [@hanson](https://www.singlestore.com/forum/u/hanson)\
**Post date:** [June 7, 2021, 11:06pm UTC](https://www.singlestore.com/forum/t/need-the-ability-to-query-directly-from-a-sp/2955/3 "2021-06-07T23:06:28Z")

</div>

Hi @franklw do you think you could respond to my above comment?

---

<div class="post-metadata">

**Author:** ![Cambridge265](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/c/c37758/32.png) [@Cambridge265](https://www.singlestore.com/forum/u/Cambridge265)\
**Post date:** [October 30, 2021, 9:52am UTC](https://www.singlestore.com/forum/t/need-the-ability-to-query-directly-from-a-sp/2955/4 "2021-10-30T09:52:35Z")

</div>

I have also similar issue any suggestion for this so please reply. Thanks in advance[.](https://www.mcdvoice.tips/)
