# Access specific row col of a query tag in another tag

**URL:** <https://forum.inductiveautomation.com/t/access-specific-row-col-of-a-query-tag-in-another-tag/46738>\
**Category:** Ignition\
**Created:** [May 15, 2021, 1:16pm UTC](https://forum.inductiveautomation.com/t/access-specific-row-col-of-a-query-tag-in-another-tag/46738 "2021-05-15T13:16:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [May 15, 2021, 1:16pm UTC](https://forum.inductiveautomation.com/t/access-specific-row-col-of-a-query-tag-in-another-tag/46738/1 "2021-05-15T13:16:39Z")

</div>

Hi,  
If I have a query tag which return a dataset, how can I reference other tag to specific row and col of this tag? (For example by an expression tag)

Imagine the query tag return 100000 rows which each row value is related to a tag.  
So instead of sending 100k request to the DB I only read all data in a single query and assign them in ignition memory.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 15, 2021, 2:22pm UTC](https://forum.inductiveautomation.com/t/access-specific-row-col-of-a-query-tag-in-another-tag/46738/2 "2021-05-15T14:22:08Z")

</div>

It is a good plan for efficient database access. I would use a gateway tag change event to loop through the new dataset whenever it arrives, assembling a list of memory tag updates to apply with writeBlocking().

---

<div class="post-metadata">

**Author:** ![matthew.ayre](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matthew.ayre/32/19499_2.png) [@matthew.ayre](https://forum.inductiveautomation.com/u/matthew.ayre)\
**Post date:** [May 17, 2021, 7:05am UTC](https://forum.inductiveautomation.com/t/access-specific-row-col-of-a-query-tag-in-another-tag/46738/3 "2021-05-17T07:05:49Z")

</div>

@nader.chinichian, I have been using [lookup](https://docs.inductiveautomation.com/display/DOC81/lookup) expression function to assign values to memory tags via a UDT. However, this is on a **much** smaller dataset. I can see this being a pain if your tags are not generic.
