query failed , don't know why

Поиск
Список
Период
Сортировка
Искать

query failed , don't know why

От:
Jeff MacDonald <jeff@pgsql.com>
Дата:
UPDATE members m,payments p SET m.status = 2 WHERE p.paydate > 'now'::datetime - '1 month'::timespan and p.productid = 'xxxxxxx' and m.gid = p.gid

i'm trying to run that query and i'm getting 

"parse error near m"

but it looks ok to me 

i'm running postgresql 7.0.2 with freebsd 4.0 stable

jeff




Re: [HACKERS] query failed , don't know why

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Jeff MacDonald  writes:
> UPDATE members m,payments p SET m.status = 2 WHERE p.paydate > 'now'::datetime - '1 month'::timespan and p.productid = 'xxxxxxx' and m.gid = p.gid
> i'm trying to run that query and i'm getting 
> "parse error near m"
> but it looks ok to me 

OK according to what reference?  SQL92 doesn't allow anything but a
simple  between UPDATE and SET --- no aliases, much less
multiple table names.
		regards, tom lane

FAQ