| От | Sim Zacks |
|---|---|
| Тема | join on a like |
| Дата | |
| Msg-id | e34jl7$2c09$1@news.hub.org обсуждение исходный текст |
| Список | pgsql-sql |
A friend suggested that I use the Like predicate as part of my join condition and I was wondering if that was wise. For example, I have a column that describes the level of an event. There is A,B,C and then they can have children, such as AA,AB,BA,BB and they can all have children as well. So if I wanted to see all the children with their parents at every level it would be: select a.* from tbl1 a join tbl1 b on a.level like b.level || '%' That would give me on one side A and on the other side A,AA,AB,AAAB,... as well as AA and on the other side all of its children. I'm just nervous about using a Like in a join.
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера