<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Querying Database With Large Decimal</title><link>https://community.appian.com/discussions/f/rules/9572/querying-database-with-large-decimal</link><description>Im having an issue where if I have a large decimal that I am using in my queryFilter to query the database with, the query crashes. a!queryFilter( field: &amp;quot;minDevCost&amp;quot;, operator: &amp;quot;&amp;lt;=&amp;quot;, value: ri!devCost ), a!queryFilter( field: &amp;quot;maxDevCost&amp;quot;, operator:</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Querying Database With Large Decimal</title><link>https://community.appian.com/thread/85879?ContentTypeID=1</link><pubDate>Sat, 18 Sep 2021 07:25:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0c6be4b2-00c0-4c07-b6a8-f9cb3bd83a3b</guid><dc:creator>Richard Michaelis</dc:creator><description>&lt;p&gt;Why not using a string if the integer limit is exceeded?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying Database With Large Decimal</title><link>https://community.appian.com/thread/85875?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2021 21:44:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b0cfdfa2-e168-492b-b252-1a5eaaa7b9ce</guid><dc:creator>leslies331</dc:creator><description>&lt;p&gt;It seems the java range has not changed.&amp;nbsp; We have a query that returns an error &amp;quot;&lt;span&gt;Expression evaluation error at function a!queryEntity: An error occurred while retrieving the data. Details: Unexpected error executing query (type...&amp;quot; when the numbers are larger than the above it works up to&amp;nbsp;2,147,483,647 - the data type on the number is double.&amp;nbsp; Is there anything else that can be done here that will allow the query to work?&amp;nbsp; It works fine if the value is divided on the DB?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying Database With Large Decimal</title><link>https://community.appian.com/thread/41987?ContentTypeID=1</link><pubDate>Fri, 13 Jan 2017 22:24:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0184b202-3e55-4b95-88a4-c684acdf0990</guid><dc:creator>davids735</dc:creator><description>You&amp;#39;ve exceeded the limit of Appian Integer value, which renders infinity, but you&amp;#39;re still well within the limits of 15 or so significant digits for a double precision floating point.  Your issue is Appian automatically assuming any value without a decimal part is not a decimal, interpreting your number as an integer and setting it to infinity.&lt;br /&gt;&lt;br /&gt;You probably want to make absolutely sure that you cast this value as a decimal type when defining it.  Something like:&lt;br /&gt;&lt;br /&gt;value: todecimal(ri!devCost)&lt;br /&gt;&lt;br /&gt;I hope this helps.&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying Database With Large Decimal</title><link>https://community.appian.com/thread/41933?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2017 09:12:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:19130e1e-c639-4411-8813-78a2f0627422</guid><dc:creator>Sally Mason</dc:creator><description>Just adding to the previous comment, in this case though, storing the decimal places requires more space, eg storing 1 compared to 1.1234567, so applying that to 9000000000, 9000000000.00 is not the same and needs more &amp;#39;space&amp;#39;, to which it exceeds the limit.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying Database With Large Decimal</title><link>https://community.appian.com/thread/41924?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2017 07:09:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ab20654f-0c9a-45b5-9c1c-27f12f429de1</guid><dc:creator>aloks0189</dc:creator><description>@benjamin it&amp;#39;s the issue of range of number, as Appian build on top of Java, hence as per Java, the range of number is between -2,147,483,648 to 2,147,483,647,&lt;br /&gt;So as per this, I think the value which you are passing, is exceeding the range and hence you are facing issue &lt;br /&gt;&lt;br /&gt;Try entering the max range value as input as mentioned above I.e. 2,147,483,647, and check whether it&amp;#39;s working or not. Even the value entered by you just exceeding a bit as we the range of int, try passing the max range value, and let us know if still facing the same issue&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying Database With Large Decimal</title><link>https://community.appian.com/thread/41923?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2017 06:30:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1c4adfa8-4db6-4e13-af74-2b8d8f4426af</guid><dc:creator>benjamins</dc:creator><description>todecimal doesnt work either. The input is already a numeric(decimal) anyway.&lt;br /&gt;&lt;br /&gt;Just to be clear, the issue is not with my code, it appears to be an issue with the expression editor. When a large number is entered into the expression field, the value is infinity which causes the rule to fail when trying to test the rule. Entering the same value into the value field works fine.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="/cfs-filesystemfile/__key/communityserver-discussions-components-files/15/Screen-Shot-2017_2D00_01_2D00_12-at-11.44.21-am.png"&gt;&lt;img src="/cfs-filesystemfile/__key/communityserver-discussions-components-files/15/Screen-Shot-2017_2D00_01_2D00_12-at-11.44.21-am.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying Database With Large Decimal</title><link>https://community.appian.com/thread/41922?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2017 05:41:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:66cf5d33-62d5-4fa5-9404-9cf9e0fed87f</guid><dc:creator>aloks0189</dc:creator><description>@benjamin try using, value: todecimal(ri!devCost)&lt;br /&gt;&lt;br /&gt;As you are facing issue with integer whereas decimal works fine for you, so try converting integer to decimal while passing it to queryEntity ,&lt;br /&gt;&lt;br /&gt;Hope this will help you&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying Database With Large Decimal</title><link>https://community.appian.com/thread/41921?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2017 05:09:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8113b146-155c-40f9-8fa2-acdb2fb89879</guid><dc:creator>Karthik</dc:creator><description>if you appian server is &amp;quot;on premise&amp;quot;, enable the logs to capture these errors in application-server.log. This log will give you exact info abt the problem&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying Database With Large Decimal</title><link>https://community.appian.com/thread/41920?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2017 05:00:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9c841be9-104b-489f-955f-1eb5d32d2b30</guid><dc:creator>benjamins</dc:creator><description>This is cloud based and application-server.log is not updated by default without having the logging levels increased.&lt;br /&gt;&lt;br /&gt;The jboss1-stdOut.log is not being updated with this error.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying Database With Large Decimal</title><link>https://community.appian.com/thread/41919?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2017 04:57:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:20b3c095-b46b-4bf9-a981-0b469cc163ff</guid><dc:creator>Karthik</dc:creator><description>application-server.log should be updated when there is any error at any rules or PMs. &lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying Database With Large Decimal</title><link>https://community.appian.com/thread/41918?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2017 04:48:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:de09c7c1-dc01-4978-a058-7bfe52ac3ba4</guid><dc:creator>benjamins</dc:creator><description>The error was in the expression editor so as far as Im aware, no logs are generated when testing rules. If you are aware of a log that I can check when testing rules, please let me know.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying Database With Large Decimal</title><link>https://community.appian.com/thread/41917?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2017 04:34:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2945d88f-5930-40aa-b50b-de309fa61e38</guid><dc:creator>Karthik</dc:creator><description>Can you share the server logs?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying Database With Large Decimal</title><link>https://community.appian.com/thread/41916?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2017 04:25:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:887204b7-5326-44d6-9f21-2d999f79aee7</guid><dc:creator>benjamins</dc:creator><description>Nothing meaningful: Expression evaluation error at function a!queryEntity [line 10]: An error occurred while retrieving the data.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying Database With Large Decimal</title><link>https://community.appian.com/thread/41915?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2017 04:23:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:38dd49bf-abe4-43c0-9c53-9e7a98538279</guid><dc:creator>Karthik</dc:creator><description>What is the error that you are getting? Can you share the logs ?&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying Database With Large Decimal</title><link>https://community.appian.com/thread/41914?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2017 03:21:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7bc5e61f-88d1-48cb-b3d1-acfc5abd5fb4</guid><dc:creator>benjamins</dc:creator><description>It appears that when I enter the number into the expression text field in the expression rule editor, the result is infinity, yet if I enter the number directly into the value, then everything seems to be working fine. This is very odd behaviour.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>