It's pretty common that i need to trim leading or trailing white space from lots of columns in a database a part of an initial ETL.
I use the following recipe a lot, and it would be great to include this functionality into sqlite-utils
trimify.sql
select 'select group_concat(''update [' || name || '] set ['' || name || ''] = trim(['' || name || ''])'', '';
'') || '';
'' as sql_to_run from pragma_table_info('''||name||''');' from sqlite_schema;
It's pretty common that i need to trim leading or trailing white space from lots of columns in a database a part of an initial ETL.
I use the following recipe a lot, and it would be great to include this functionality into sqlite-utils
trimify.sql
then something like: