# Pydataset returns â following value

**URL:** <https://forum.inductiveautomation.com/t/pydataset-returns-a-following-value/15229>\
**Category:** Ignition\
**Created:** [September 1, 2017, 2:45pm UTC](https://forum.inductiveautomation.com/t/pydataset-returns-a-following-value/15229 "2017-09-01T14:45:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cja7928](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@cja7928](https://forum.inductiveautomation.com/u/cja7928)\
**Post date:** [September 1, 2017, 2:45pm UTC](https://forum.inductiveautomation.com/t/pydataset-returns-a-following-value/15229/1 "2017-09-01T14:45:52Z")

</div>

the following code returns â at the end of the string. If I strip off the last character it doesnt strip the â it strips the last character from my desired value and the â remains. can anyone tell me what im doing wrong?

Query=‘select value from mytable where location = 100’  
data = system.db.runQuery(Query,’’)  
for row in data:  
location = row[“LOCATION”]   
print str(location)

---

<div class="post-metadata">

**Author:** ![cja7928](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@cja7928](https://forum.inductiveautomation.com/u/cja7928)\
**Post date:** [September 1, 2017, 3:25pm UTC](https://forum.inductiveautomation.com/t/pydataset-returns-a-following-value/15229/2 "2017-09-01T15:25:26Z")

</div>

NM - I changed to the following with no issue:

Query=‘select value from mytable where location = 100’  
data = system.db.runQuery(Query,’’)  
location = str(data[0][0])  
print location

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [September 7, 2017, 7:14pm UTC](https://forum.inductiveautomation.com/t/pydataset-returns-a-following-value/15229/3 "2017-09-07T19:14:49Z")

</div>

If you are only interested in one value, use `system.db.runScalarQuery` - this either returns one value or `null`.
