# Expression in SQL query

**URL:** <https://www.five.org/t/expression-in-sql-query/234>\
**Category:** How do I?\
**Created:** [June 9, 2023, 5:32am UTC](https://www.five.org/t/expression-in-sql-query/234 "2023-06-09T05:32:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shweta](https://yyz2.discourse-cdn.com/flex030/user_avatar/www.five.org/shweta/32/186_2.png) [@shweta](https://www.five.org/u/shweta)\
**Post date:** [June 9, 2023, 5:32am UTC](https://www.five.org/t/expression-in-sql-query/234/1 "2023-06-09T05:32:57Z")

</div>

Hello @mark,

I tried adding {{five.currentUserKey()}} to query but I am getting error System Error : line 6 column 30 near "{five.currentUserKey()}} "

Here is my query

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/five/original/1X/4a3c1e4f97add128fcf261c974cb32ef51150aeb.png)

and this is the error:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/five/original/1X/b3e7ba1ad2e646f24dc31793720b236477c0dfd4.png)

I also tried replacing {{five.currentUserKey()}} with ? and added it in the parameter

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/five/original/1X/4ffc27ac870d5b0a0c83f082cc0e35d2116ebf10.png)

Then when I run query it doesn’t give me any result

---

<div class="post-metadata">

**Author:** ![shweta](https://yyz2.discourse-cdn.com/flex030/user_avatar/www.five.org/shweta/32/186_2.png) [@shweta](https://www.five.org/u/shweta)\
**Post date:** [June 9, 2023, 6:06am UTC](https://www.five.org/t/expression-in-sql-query/234/2 "2023-06-09T06:06:28Z")

</div>

The userKey I am getting in result, if I don’t add any condition.

and userKey on inspect is different.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/five/original/1X/fbc7c8e21ae4fdb76e7d6d5c1349f37ff855fb80.png)

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/five/original/1X/ebbbcc4e67c3018054a0e7ea409bf8fd0632de73.png)
