# foundset filter / SQL

**URL:** <https://forum.servoy.com/t/foundset-filter-sql/16010>\
**Category:** Classic Servoy\
**Created:** [June 6, 2012, 5:08pm UTC](https://forum.servoy.com/t/foundset-filter-sql/16010 "2012-06-06T17:08:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![djlapin](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@djlapin](https://forum.servoy.com/u/djlapin)\
**Post date:** [June 6, 2012, 5:08pm UTC](https://forum.servoy.com/t/foundset-filter-sql/16010/1 "2012-06-06T17:08:28Z")

</div>

I looking for appropriate SQL for a foundset filter…

> SELECT table.fieldName FROM table WHERE table.fieldName IN arrayName

Can this work if arrayName contains just the first 7 characters of a longer string in fieldName? Can this be expressed in the filter?

Thank you,  
Don

---

<div class="post-metadata">

**Author:** ![westly](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@westly](https://forum.servoy.com/u/westly)\
**Post date:** [June 6, 2012, 7:30pm UTC](https://forum.servoy.com/t/foundset-filter-sql/16010/2 "2012-06-06T19:30:54Z")

</div>

Have you tried substring on table.fieldName?

---

<div class="post-metadata">

**Author:** ![djlapin](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@djlapin](https://forum.servoy.com/u/djlapin)\
**Post date:** [June 7, 2012, 6:28am UTC](https://forum.servoy.com/t/foundset-filter-sql/16010/3 "2012-06-07T06:28:11Z")

</div>

I didn’t know that SQL had a substring command. Foolish me!

Thank you,  
Don
