# Query Builder replacement for SQL STRING() function

**URL:** <https://forum.servoy.com/t/query-builder-replacement-for-sql-string-function/19554>\
**Category:** Classic Servoy\
**Created:** [January 4, 2018, 10:20am UTC](https://forum.servoy.com/t/query-builder-replacement-for-sql-string-function/19554 "2018-01-04T10:20:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![huber](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/huber/32/5042_2.png) [@huber](https://forum.servoy.com/u/huber)\
**Post date:** [January 4, 2018, 10:20am UTC](https://forum.servoy.com/t/query-builder-replacement-for-sql-string-function/19554/1 "2018-01-04T10:20:24Z")

</div>

Hi All

I wish everyone a happy new year and a good and successful 2018!

I am looking to translate the following SQL statement and can’t find the STRING() function replacement in the Servoy Query Builder:

```auto
var query = "\
		SELECT\
			id,\
			STRING('i18n:', name)\
		FROM\
			menus\
		WHERE\
			menu_id IS NULL";

```

Best regards,

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [January 4, 2018, 11:03am UTC](https://forum.servoy.com/t/query-builder-replacement-for-sql-string-function/19554/2 "2018-01-04T11:03:36Z")

</div>

Without knowing the STRING() function (what database is this??), it looks like you are looking for the concat function…

---

<div class="post-metadata">

**Author:** ![huber](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/huber/32/5042_2.png) [@huber](https://forum.servoy.com/u/huber)\
**Post date:** [January 4, 2018, 1:03pm UTC](https://forum.servoy.com/t/query-builder-replacement-for-sql-string-function/19554/3 "2018-01-04T13:03:32Z")

</div>

> patrick:  
> Without knowing the STRING() function (what database is this??), it looks like you are looking for the concat function…

The database is SAP SQL Anywhere 17 (once used by Servoy as default database .-) I tried with concat, but I did not find out how to concat a fixed text like ‘i18n’, followed by a database column name (in my case called name). Any idea?

Regards, Robert

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [January 4, 2018, 5:42pm UTC](https://forum.servoy.com/t/query-builder-replacement-for-sql-string-function/19554/4 "2018-01-04T17:42:48Z")

</div>

How about:

```auto
q.result.add(q.functions.concat('i18n:', q.columns.name));

```

---

<div class="post-metadata">

**Author:** ![huber](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/huber/32/5042_2.png) [@huber](https://forum.servoy.com/u/huber)\
**Post date:** [January 4, 2018, 8:35pm UTC](https://forum.servoy.com/t/query-builder-replacement-for-sql-string-function/19554/5 "2018-01-04T20:35:37Z")

</div>

Patrick, exactly what I was looking for! Thanks.

> patrick:  
> How about:
> 
> ```auto
> q.result.add(q.functions.concat('i18n:', q.columns.name));
> 
> ```

Best regards,
