Is there a way to get the line number where an exception was thrown?

The answers have mentioned both, $$PLSQL_LINE & DBMS_UTILITY.FORMAT_ERROR_BACKTRACE. But I would like to add a bit about the difference between them: Predefined Inquiry Directives $$PLSQL_LINE & $$PLSQL_UNIT PLSQL_LINE predefined inquiry directive is a PLS_INTEGER literal value indicating the line number reference to $$PLSQL_LINE in the current program unit. From its definition, PLSQL_LINE is not suitable … Read more

How to split array list into equal parts?

This should give you all your parts: int partitionSize = 1000; List<List<Integer>> partitions = new LinkedList<List<Integer>>(); for (int i = 0; i < originalList.size(); i += partitionSize) { partitions.add(originalList.subList(i, Math.min(i + partitionSize, originalList.size()))); }

Default Values to Stored Procedure in Oracle

Default values are only used if the arguments are not specified. In your case you did specify the arguments – both were supplied, with a value of NULL. (Yes, in this case NULL is considered a real value :-). Try: EXEC TEST() Share and enjoy. Addendum: The default values for procedure parameters are certainly buried … Read more

What’s the difference between pls_integer and binary_integer?

Historical reasons. They used to be different before 10g: On 8i and 9i, PLS_INTEGER was noticeably faster than BINARY_INTEGER. When it comes to declaring and manipulating integers, Oracle offers lots of options, including: INTEGER – defined in the STANDARD package as a subtype of NUMBER, this datatype is implemented in a completely platform-independent fashion, which … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)