Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Powerbuilder and postgresql sequence problem

Status
Not open for further replies.

11shanu

Programmer
Feb 5, 2004
1
US
Hi,
We have an application written in powerbuilder with oracle database. Now we have moved to Postgres instead of oracle so we had to make few changes in our sql queries. But in the sequence there is this problem:
In oracle it was ..
SELECT "sqorgid".NEXTVAL
INTO :ll_org_id
from dual
USING sqlca ;

But in postgres there is no need for dual and query should be in this form..
SELECT NEXTVAL('sqorgid')
INTO :ll_org_id
USING sqlca ;

but it is giving error in powerbuilder, it seems like powerbuilder needs 'from' clause.
Please tell me how to modify this select stmt so that it work in the powerbuilder.

Thanks
 
i haven't used powerbuilder if it is oracle specific tool it is normal to have problems ;-)

if you use it in plpgsql function you can try the alternative syntax

temp := nextval(''r_test_id_seq'');

what do you use :ll_org_id for? I can't recognize it as postgre feature

also in postgre this usage of USING is also a problem
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top