# How search a value (I don't know the row and column)

**URL:** <https://forum.robotframework.org/t/how-search-a-value-i-dont-know-the-row-and-column/8636>\
**Category:** DatabaseLibrary\
**Created:** [11 March 2025 17:00 UTC](https://forum.robotframework.org/t/how-search-a-value-i-dont-know-the-row-and-column/8636 "2025-03-11T17:00:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Omn32](https://avatars.discourse-cdn.com/v4/letter/o/eada6e/32.png) [@Omn32](https://forum.robotframework.org/u/Omn32)\
**Post date:** [11 March 2025 17:00 UTC](https://forum.robotframework.org/t/how-search-a-value-i-dont-know-the-row-and-column/8636/1 "2025-03-11T17:00:53Z")

</div>

Hello everyone,  
How search a value (I don’t know the row and column) into the result query.  
My result query is like this:

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/9/93917c13fedf5d8f91a31042eded91ac95bd37fb.png)

I want to know if D80 exist in the result ${q\_result}  
I tried to use " Check Query Result @{q\_result} contains D80" but I have an error  
 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/6/63b5533cd6eecf86bebb50444c29e692c29ab967.png)

Thx

---

<div class="post-metadata">

**Author:** ![CharlieScene](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/charliescene/32/3484_2.png) [@CharlieScene](https://forum.robotframework.org/u/CharlieScene)\
**Post date:** [11 March 2025 20:13 UTC](https://forum.robotframework.org/t/how-search-a-value-i-dont-know-the-row-and-column/8636/2 "2025-03-11T20:13:20Z")

</div>

Hi,

The query result is a list containing a tuple.  
List is a list of corresponding rows (here just one), then tuple contains row columns infos.

So you can’t pass the result to the Check Query Results.

This keyword required to pass the query directly:

```
Check Query Results SELECT * FROM.... contains D80

```

But seems a bit strange to search a value that query already tried to get?

If you want to use directly ${q\_result} (do the query then check content) , you could use Evaluate:

```
 ${hasValue} Evaluate "D80" in ${q_result}

```

This is a quick example, you will probably have to managed multilines results/lists and loop over uncompressed tuples to manage all cases and q\_result format.

Regards  
Charlie

---

<div class="post-metadata">

**Author:** ![rasjani](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rasjani](https://forum.robotframework.org/u/rasjani)\
**Post date:** [12 March 2025 07:20 UTC](https://forum.robotframework.org/t/how-search-a-value-i-dont-know-the-row-and-column/8636/3 "2025-03-12T07:20:21Z")

</div>

Wouldn’t just simple count do in this case ? If the original SQL query has `WHERE c_prot = 'D80'` then the query wont return any rows if `c_prot` is not **D80** and thus it is quaranteed to have that value on each row returned by the query ?

---

<div class="post-metadata">

**Author:** ![CharlieScene](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/charliescene/32/3484_2.png) [@CharlieScene](https://forum.robotframework.org/u/CharlieScene)\
**Post date:** [12 March 2025 07:29 UTC](https://forum.robotframework.org/t/how-search-a-value-i-dont-know-the-row-and-column/8636/4 "2025-03-12T07:29:04Z")

</div>

Yeah totally, that’s why I mention the Select that already search for D80.  
A count is a fast solution to know if present, and will return occurrences as a bonus.  
Nice!

---

<div class="post-metadata">

**Author:** ![Omn32](https://avatars.discourse-cdn.com/v4/letter/o/eada6e/32.png) [@Omn32](https://forum.robotframework.org/u/Omn32)\
**Post date:** [12 March 2025 07:53 UTC](https://forum.robotframework.org/t/how-search-a-value-i-dont-know-the-row-and-column/8636/5 "2025-03-12T07:53:45Z")

</div>

Thx Everyone for your reply.

I put D80 in “where and search” for the example, Sorry it’s stupide 🫣

I filter with D80 and I can have one or more rows.  
Then, I search for values ​​without specifying the columns, just to quickly check if my values ​​are up to date.

I could count the columns and rows and then loop, but I’m looking for a simple and quick solution.  
Thanks again.

---

<div class="post-metadata">

**Author:** ![Omn32](https://avatars.discourse-cdn.com/v4/letter/o/eada6e/32.png) [@Omn32](https://forum.robotframework.org/u/Omn32)\
**Post date:** [12 March 2025 08:18 UTC](https://forum.robotframework.org/t/how-search-a-value-i-dont-know-the-row-and-column/8636/6 "2025-03-12T08:18:24Z")

</div>

Hi @CharlieScene  
“Evaluate and Check Query Result” don’t work.

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/3/328c9b77ded6ecb32e90e09499f0e9664dbca76c.png)

I think I’ll have to create a loop.  
However, I can give it the column name; maybe that might help ?

Have a nice day

---

<div class="post-metadata">

**Author:** ![Omn32](https://avatars.discourse-cdn.com/v4/letter/o/eada6e/32.png) [@Omn32](https://forum.robotframework.org/u/Omn32)\
**Post date:** [12 March 2025 09:22 UTC](https://forum.robotframework.org/t/how-search-a-value-i-dont-know-the-row-and-column/8636/7 "2025-03-12T09:22:23Z")

</div>

[How search a value (I don’t know the row and column) · Issue #241 · MarketSquare/Robotframework-Database-Library](https://github.com/MarketSquare/Robotframework-Database-Library/issues/241)
