| От | Richard Huxton |
|---|---|
| Тема | Re: wrong query result |
| Дата | |
| Msg-id | 47FC7F33.4040405@archonet.com обсуждение исходный текст |
| Ответ на | wrong query result ("josep porres" <jmporres@gmail.com>) |
| Список | pgsql-general |
josep porres wrote: > select clau, lecact-lecant as m3, m3any, ta, tc, 3 as mesos, persones, true > as clavegueram > from fac_abonats > where clau in (select clau from tmp_claus_prova) > order by clau > At the end I've realized that there is no column named 'clau'. It has > another name. > The question is: > Is it a normal behaviour? Because I think that if the query is wrong, > wouldn't be better to raise an error? It's not an error, you need to be able to refer to columns in the outer query so you can do: ...(SELECT x FROM tmp_claus_prova WHERE y = clau) It *is* confusing where you have a typo though. It gets everyone from time to time. -- Richard Huxton Archonet Ltd
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера