| От | Richard Huxton |
|---|---|
| Тема | Re: Update sql question |
| Дата | |
| Msg-id | 42A5BB09.2050707@archonet.com обсуждение исходный текст |
| Ответ на | Update sql question (Don Isgitt <djisgitt@soundenergy.com>) |
| Список | pgsql-general |
Don Isgitt wrote: > > gds2=# update master set operator=(select > coalesce(newopr,master.operator) from opr_match where state=master.state > and oldopr=master.operator limit 1) where state='NM' and operator is not > null; > What am I doing wrong that gives me the 261 null operator fields after > the update? Hmm - haven't tested this, but what would happen if the subselect returned no matches? Quickest test is probably to add a dummy value to the coalesce and see if that takes the place of the 261 nulls. If it doesn't, the subselect isn't matching for those rows. -- Richard Huxton Archonet Ltd
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера