oracle SQL return invalid data and way to find which data
Hi I have issue with SQL and when convert data to numeric return error. Then how to identify or skip invalid data to run the sql
SELECT *
FROM (
SELECT to_number(trim(ariline_no)) , to_number(COUNT(CREW_no)) NONO
FROM MAIN
GROUP BY to_number(trim(ariline_no))
) C
error says
ORA-01722: invalid number
01722. 00000 - "invalid number"
*Cause: The specified number was invalid.
*Action: Specify a valid number.
+++++++++++++++++++++
If I alter this way its works .
SELECT *
FROM (
SELECT ariline_no, count(CREW_no) NONO
FROM MAIN
GROUP BY ariline_no
) C
++++++++++++++++++++++
but I need to find which data is cause of this issue