Skip to content

Instantly share code, notes, and snippets.

@palcu
Created July 31, 2015 10:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save palcu/c12e2d285bbac51e9e57 to your computer and use it in GitHub Desktop.
Save palcu/c12e2d285bbac51e9e57 to your computer and use it in GitHub Desktop.
#XLS
update resource set format='xls' where format='XLS';
update resource set format='xls' where format='.xls';
#XML
update resource set format='xml' where format='.xml';
update resource set format='xml' where format='XML';
update resource set format='xml' where format='Xml';
update resource set format='csv' where format='CSV';
update resource set format='ods' where format='ODS';
update resource set format='xlsx' where format='XLSX';
update resource set format='pdf' where format='PDF';
update resource set format='html' where format='HTML';
update resource set format='kmz' where format='KMZ';
update resource set format='kml' where format='KML';
update resource set format='jpeg' where format='JPEG';
update resource set format='png' where format='PNG';
@vitorbaptista
Copy link

As a suggestion, to lowercase all strings you could use the SQL function LOWER() as in UPDATE RESOURCE SET format=LOWER(format)

@palcu
Copy link
Author

palcu commented Jun 29, 2016

Thanks a lot. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment