Debugging Views that don’t compile

If you’re running SQLDeveloper and you compile a View, it will show a little red X next to it if there are issues.

However it won’t actually tell you what the problem is!

Go into sqlplus and enter this command:

 show errors view my_schema.kc_tradedetails

You should then see something like this

 Errors for VIEW MY_SCHEMA.KC_TRADEDETAILS:
 LINE/COL ERROR -------- ----------------------------------------------------------------- 0/0 ORA-00904: "TRADEFIELDS"."COMPANY_SECTOR_CODE": invalid identifier

Which is now a straightforward debugging task

Leave a Reply