| От | Bosco Rama |
|---|---|
| Тема | Re: Using a CTE for an update |
| Дата | |
| Msg-id | 51A92811.9080802@boscorama.com обсуждение исходный текст |
| Ответ на | Re: Using a CTE for an update (David Salisbury <salisbury@globe.gov>) |
| Ответы |
Re: Using a CTE for an update
|
| Список | pgsql-general |
On 05/31/13 15:33, David Salisbury wrote: > > And without trying too much ;), I'll bet there is no way to do this in SQL proper. i.e. > I can't correlate an update with a select stmt, as in a correlated sub-query sort of way. > So for this to work I would indeed need to write a function that "hard codes" the values > within the update stmt. I think this is what you want: update atmos_sites asites set stationid = my.stationid from my_stations my where asites.id = my.atmos_site_id; HTH Bosco.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера