Sql Server Function Find Substring Python