# SQL query in a table as alternative to vlookup?

**URL:** <https://community.nocodb.com/t/sql-query-in-a-table-as-alternative-to-vlookup/1190>\
**Category:** Formulas\
**Created:** [May 24, 2024, 12:23pm UTC](https://community.nocodb.com/t/sql-query-in-a-table-as-alternative-to-vlookup/1190 "2024-05-24T12:23:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![omnimercador](https://avatars.discourse-cdn.com/v4/letter/o/3bc359/32.png) [@omnimercador](https://community.nocodb.com/u/omnimercador)\
**Post date:** [May 24, 2024, 12:23pm UTC](https://community.nocodb.com/t/sql-query-in-a-table-as-alternative-to-vlookup/1190/1 "2024-05-24T12:23:25Z")

</div>

I realise that a vlookup function presently doesn’t exist in NocoDB, and a workaround is manually linking records via lookup.

I was wondering whether there might be a way of creating a field which is a SQL query, to automate the lookup? (I know nothing about SQL, but figured that might be a way).

As context, one of the uses I’d like to pursue is capturing events related to stock items. For that, it’d be great if one could scan a barcode, and the product title is immediately populated.

---

<div class="post-metadata">

**Author:** ![Navi](https://avatars.discourse-cdn.com/v4/letter/n/3be4f8/32.png) [@Navi](https://community.nocodb.com/u/Navi)\
**Post date:** [May 24, 2024, 12:25pm UTC](https://community.nocodb.com/t/sql-query-in-a-table-as-alternative-to-vlookup/1190/2 "2024-05-24T12:25:24Z")

</div>

A relevant feature request is [here](https://github.com/nocodb/nocodb/issues/4603) for reference.

---

<div class="post-metadata">

**Author:** ![omnimercador](https://avatars.discourse-cdn.com/v4/letter/o/3bc359/32.png) [@omnimercador](https://community.nocodb.com/u/omnimercador)\
**Post date:** [May 24, 2024, 12:39pm UTC](https://community.nocodb.com/t/sql-query-in-a-table-as-alternative-to-vlookup/1190/3 "2024-05-24T12:39:07Z")

</div>

Indeed - I had missed that feature request whilst searching, but it shows exactly the use case. Thank you.
