ANTON KADACH

Generation

text to sql syntaxTue, 17 Jan 2023

Запрос, который проверяет содержится ли наименование города из поля city в поле address. Из поля city убираются все типы гео-объектов в сокращенном виде. postgresql

SELECT * FROM customers WHERE LOWER(ltrim(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(city, 'Спб.', ''), 'Санкт-Петербур

Questions about programming?Chat with your personal AI assistant