Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Script to Find Trailing Spaces

user12036075Aug 29 2019 — edited Aug 29 2019

Hi there, I was wondering if anyone had a premade script to search a table for fields that have trailing spaces?  I know how to do it by specifying the exact column I want it to search... but I need to have a script or function/procedure that can scan fields in tables for trailing spaces.  We are doing a migration that has trailing spaces just randomly all over the place and I really don't feel like writing trim statements over every single field not knowing exactly where they are. 

I suppose I actually need it to check for trailing and leading spaces... but if I had a function where I could pass in a table name or something and then it tell me which columns had either leading or trailing spaces that would be fantastic.

Thanks in advance!

Comments
Post Details
Added on Aug 29 2019
2 comments
1,275 views