# Brand New to qSql

**URL:** <https://forum.kx.com/t/brand-new-to-qsql/12539>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [May 6, 2022, 11:16pm UTC](https://forum.kx.com/t/brand-new-to-qsql/12539 "2022-05-06T23:16:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkoon1](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mkoon1](https://forum.kx.com/u/mkoon1)\
**Post date:** [May 6, 2022, 11:16pm UTC](https://forum.kx.com/t/brand-new-to-qsql/12539/1 "2022-05-06T23:16:00Z")

</div>

Just got started with qsql.

how to I compare 2 columns of type string.&nbsp; childID and parentID are of type string

&nbsp;

select from data where childID like parentID

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![SJT1](https://avatars.discourse-cdn.com/v4/letter/s/eb8c5e/32.png) [@SJT1](https://forum.kx.com/u/SJT1)\
**Post date:** [May 7, 2022, 7:14pm UTC](https://forum.kx.com/t/brand-new-to-qsql/12539/2 "2022-05-07T19:14:00Z")

</div>

If its an exact match you can use Match&nbsp;Each&nbsp;`~'`.

&nbsp;

select from data where childID ~’ parentID

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![davidcrossey1](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@davidcrossey1](https://forum.kx.com/u/davidcrossey1)\
**Post date:** [May 9, 2022, 2:48am UTC](https://forum.kx.com/t/brand-new-to-qsql/12539/3 "2022-05-09T02:48:00Z")

</div>

If it’s not an exact match, you could wrap the second column in wildcards characters and use&nbsp;Like&nbsp;Each `like'`

select from data where childID like’ (“_“,‘parentID,’”_”)

&nbsp;Note - this assumes that the parentID has less characters than childID
