# How can I query 2 different tables and get the result in 2 different result sets using 1 connector

**URL:** <https://community.ofelia.com/t/how-can-i-query-2-different-tables-and-get-the-result-in-2-different-result-sets-using-1-connector/6514>\
**Category:** Q&A\
**Created:** [30 September 2015 15:05 UTC](https://community.ofelia.com/t/how-can-i-query-2-different-tables-and-get-the-result-in-2-different-result-sets-using-1-connector/6514 "2015-09-30T15:05:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ffernandezc](https://avatars.discourse-cdn.com/v4/letter/f/e19adc/32.png) [@ffernandezc](https://community.ofelia.com/u/ffernandezc)\
**Post date:** [30 September 2015 15:05 UTC](https://community.ofelia.com/t/how-can-i-query-2-different-tables-and-get-the-result-in-2-different-result-sets-using-1-connector/6514/1 "2015-09-30T15:05:22Z")

</div>

Hi,

I want to know if it is possible to use only one connector in order to execute 2 or more different select querys and store the returned values in differents resultsets.

And also if it is possible how to do it

Thanks.

---

<div class="post-metadata">

**Author:** ![yannick.lombardi](https://avatars.discourse-cdn.com/v4/letter/y/8e8cbc/32.png) [@yannick.lombardi](https://community.ofelia.com/u/yannick.lombardi)\
**Post date:** [30 September 2015 15:29 UTC](https://community.ofelia.com/t/how-can-i-query-2-different-tables-and-get-the-result-in-2-different-result-sets-using-1-connector/6514/2 "2015-09-30T15:29:19Z")

</div>

Hi.

My answer is yes and no.

No because you can’t do this if you use the default sql connector. They accept only 1 query and return 1 resulset.

Yes because you can create your own connector that will execute 2 or more query and return 2 or more resultset.

If you have two distincts queries, I recommand to create two task that will both execute one query. It is more readable.
