Today I had to struggle with some Oracle errors like

ORA-00972: identifier is too long

(Oracle identifiers can have a length up to 30 chars only.) Unfortunately, Oracle doesn’t tell you which identifier is too long. For me following Ruby snippet did the trick. Just copy your SQL into a file view.sql and run this one-liner:

IO.read("view.sql").split(/[\.\(\s]/).each { |c| puts c if c.length > 30 }