Created
June 7, 2017 00:28
-
-
Save sevaine/4e3356af93f016ecef2ba9ecf370047e to your computer and use it in GitHub Desktop.
Revisions
-
sevaine created this gist
Jun 7, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ # # This should update the url to NEW_IP and NEW_PORT ( UNTESTED ) # DEFINE NEW_IP = '10.10.10.10' DEFINE NEW_PORT = '443' UPDATE DB_NAME.TABLE_NAME SET field_name=REGEXP_REPLACE(field_name, '(http?://)(.*):(.*)/(.*)', '\1&NEW_IP:&NEW_PORT/\4') WHERE field_name LIKE 'http%' AND field_name NOT LIKE '%uri/path%'