Search Postgresql Archives

Re: missing FROM-clause entry for table bbbb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17 January 2018 at 00:36, Abhra Kar <abhra.kar@xxxxxxxxx> wrote:
>  insert into aaaa (id, groupid, ele_id, ro_element_id) ")
>              select bbbb.nextval, :groupid, gosp.neteleid, gosp.hodev
>        from net_ele gos, net_gos_prop gosp "
>            where gos.eid in ( :eids ) and gos.id = gosp.net_element_id and
>             gos.id not in (select ealjs.element_id from aaaa ealjs where
> ealjs.groupid = :groupid)
>
> If I run this it gives error for ":".If I remove : then I will get error
> like  missing FROM-clause entry for table bbbb.

bbbb.nextval looks like some sort of Oracle syntax to get the nextval
from a sequence. In PostgreSQL you'd do nextval('bbbb'); Assuming you
have a sequence named "bbbb"

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux