# Oledb command to filter a double integer

**URL:** <https://forum.uipath.com/t/oledb-command-to-filter-a-double-integer/545243>\
**Category:** Studio\
**Tags:** oledb, excel-automation, datatable, studio, excel, database, activities\
**Created:** [May 16, 2023, 8:40am UTC](https://forum.uipath.com/t/oledb-command-to-filter-a-double-integer/545243 "2023-05-16T08:40:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pinky\_AG](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/pinky_ag/32/54193_2.png) [@Pinky\_AG](https://forum.uipath.com/u/Pinky_AG)\
**Post date:** [May 16, 2023, 8:40am UTC](https://forum.uipath.com/t/oledb-command-to-filter-a-double-integer/545243/1 "2023-05-16T08:40:55Z")

</div>

I have a table with followong columns

Amount Name  
100 testĺ  
2.00 trst2  
3.98 test3

I need the oledb command which will convert Amount column as long integer and filter with the long integer value(CLng)

---

<div class="post-metadata">

**Author:** ![jack.chan](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/jack.chan/32/176616_2.png) [@jack.chan](https://forum.uipath.com/u/jack.chan)\
**Post date:** [May 16, 2023, 9:17am UTC](https://forum.uipath.com/t/oledb-command-to-filter-a-double-integer/545243/2 "2023-05-16T09:17:25Z")

</div>

@Pinky_AG  
use the `CLng` function  
` "SELECT * FROM YourTable WHERE CLng(Amount) = 100"`

---

<div class="post-metadata">

**Author:** ![Pinky\_AG](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/pinky_ag/32/54193_2.png) [@Pinky\_AG](https://forum.uipath.com/u/Pinky_AG)\
**Post date:** [May 16, 2023, 10:01am UTC](https://forum.uipath.com/t/oledb-command-to-filter-a-double-integer/545243/4 "2023-05-16T10:01:42Z")

</div>

This one is working for exact match…if we need to do fuzzy match what would be the syntax

Select \* from table where Clng(Amount) Like 100.99

---

<div class="post-metadata">

**Author:** ![Pinky\_AG](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/pinky_ag/32/54193_2.png) [@Pinky\_AG](https://forum.uipath.com/u/Pinky_AG)\
**Post date:** [May 16, 2023, 4:31pm UTC](https://forum.uipath.com/t/oledb-command-to-filter-a-double-integer/545243/5 "2023-05-16T16:31:54Z")

</div>

I need to check if column value is in the range of 90-105  
Can someone help with oledb query for the same

---

<div class="post-metadata">

**Author:** ![supermanPunch](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/supermanpunch/32/133652_2.png) [@supermanPunch](https://forum.uipath.com/u/supermanPunch)\
**Post date:** [May 16, 2023, 4:33pm UTC](https://forum.uipath.com/t/oledb-command-to-filter-a-double-integer/545243/6 "2023-05-16T16:33:47Z")

</div>

> [@Pinky\_AG](#):
>
> I need to check if column value is in the range of 90-105

Hi @Pinky_AG ,

Maybe below is the Query that you can use :

```auto
SELECT * FROM YourTable WHERE CLng(Amount) >= 90 AND CLng(Amount) <= 105

```

---

<div class="post-metadata">

**Author:** ![Pinky\_AG](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/pinky_ag/32/54193_2.png) [@Pinky\_AG](https://forum.uipath.com/u/Pinky_AG)\
**Post date:** [May 17, 2023, 2:54am UTC](https://forum.uipath.com/t/oledb-command-to-filter-a-double-integer/545243/7 "2023-05-17T02:54:15Z")

</div>

Thank you it is working…

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [May 20, 2023, 2:54am UTC](https://forum.uipath.com/t/oledb-command-to-filter-a-double-integer/545243/8 "2023-05-20T02:54:21Z")

</div>

Closed on May 20, 2023, 2:54am UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
