Switching to a new approach in sql string replacement (partial; shift)