# Comparar valor do banco de dados

**URL:** <https://forum.robotframework.org/t/comparar-valor-do-banco-de-dados/2349>\
**Category:** Robot Framework\
**Created:** [30 August 2021 18:03 UTC](https://forum.robotframework.org/t/comparar-valor-do-banco-de-dados/2349 "2021-08-30T18:03:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guigo\_Ramone](https://avatars.discourse-cdn.com/v4/letter/g/53a042/32.png) [@Guigo\_Ramone](https://forum.robotframework.org/u/Guigo_Ramone)\
**Post date:** [30 August 2021 18:03 UTC](https://forum.robotframework.org/t/comparar-valor-do-banco-de-dados/2349/1 "2021-08-30T18:03:49Z")

</div>

Boa tarde Pessoal estou com dificuldade em pegar um valor do BD via select e comprar com um outro valor.  
Em anexo o meu cenário de teste.

 ![Screenshot_1](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/1X/e3e12b429c507a4d5646bd25d96c7ba8ec26e108.png)  
Desde já agradeço a ajuda.

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [30 August 2021 21:44 UTC](https://forum.robotframework.org/t/comparar-valor-do-banco-de-dados/2349/2 "2021-08-30T21:44:27Z")

</div>

Olá Rodrigo,

There are some problems with your question. For start, asking in other language than English makes difficult to get the needed attention. So please, always communicate in English in this Forum.

Another thing, is to post an image, that too makes very hard to see the problem, or even to attempt to reproduce the problem.

Now, for your actual problem,  
The error message is telling us that it could not compare an array with a single element, which is a tuple, where the second member is empty and the first is a function named `Decimal` having as argument the string ‘826.98’, and this `Decimal` function is not defined.

To fix this, your `Query` keyword should return a proper value and not containing a call to a function.

Also, it seems you are defining a variable named `${RESPOSTA_SELECT[0][0]}` that would appear to be selecting the first element of the first list of a variable, but it is just a list variable with a misleading name.

---

<div class="post-metadata">

**Author:** ![Gerald06](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@Gerald06](https://forum.robotframework.org/u/Gerald06)\
**Post date:** [27 October 2021 05:56 UTC](https://forum.robotframework.org/t/comparar-valor-do-banco-de-dados/2349/3 "2021-10-27T05:56:13Z")

</div>

Thanks for update and quick reply, Very helpful and thankful for me.
