Skip to content
Advertisement

Determine what rows are causing error in query

I have an Oracle 18c table that has 15,000 rows. As a test, I’m trying to run the following query on it:

When I run that query in SQL Developer, it initially runs without errors, but that’s just because it’s only selecting the first 50 rows.

If I try to run the query on all rows (via CTRL+END), then it throws an error:


How can I determine what specific rows are causing that error?

I tried using SDO_UTIL.VALIDATE_WKBGEOMETRY() to find the problem blobs. But, surprisingly, it didn’t return any FALSE values.

Advertisement

Answer

Create a function to wrap the call that is causing issues and catch the exception in the function:

Then use it in your query:


In later Oracle versions, you can define the function in the query:

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement