question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Function "Select row count for query" throws numberFormatException

See original GitHub issue

If filtering column is type of varchar2 and it is defined as long at where defination of query, count function throws like this: Can't transform query to SELECT count(*) java.lang.NumberFormatException: Passed value does not contain a parsable long value Here example, Table DLL: CREATE TABLE "STUDENT" ( "STUDENT_NO" VARCHAR2(100), "STUDENT_ID" NUMBER(*,0) ); Sample query: select * from student where student_no = 20161114000000035001; According to invalid usage of student_no column, above script can be executable on script tab. I know correct usage should be like this SELECT * FROM STUDENT WHERE STUDENT_NO = '20161114000000035001'; However, it is working on short number(Integer) values, long values should be supported too. If you are define student_no correctly, this function does not try to convert long value to String. So, there is no problem. It should be handle number format exception according to size of input. Thanks

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
serge-ridercommented, Jan 21, 2017

Hopefully this issue will be fixed in JSQLParser. Moving to 4.x.

0reactions
serge-ridercommented, Mar 4, 2017

Works with JSQLParser 0.9.7.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Number format exception being thrown while fetching a ...
The problem is not with your code but the values stored in database. See the Exception, it says Invalid int: "" . So...
Read more >
SQL error messages and exceptions - Oracle Help Center
The ORDER BY clause of a SELECT UNION statement only supports unqualified column references and column position numbers. Other expressions are not currently ......
Read more >
PDOStatement::rowCount - Manual - PHP
PDOStatement::rowCount() returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement executed by the corresponding PDOStatement ...
Read more >
java.lang.NumberFormatException: For input string: "false ...
The following query returns more than 1 rows. select * from cwd_user_attributes where lower_attribute_value = 'false' and attribute_name !=
Read more >
NumberFormatException in Java with Examples
That means, when it is not possible to convert a string in any numeric type (float, int, etc), this exception is thrown. It...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found