On Thu, Sep 01, 2005 at 11:58:27AM +0530, Venki wrote: > > new_id = EXECUTE("SELECT FROM currval("mydata_id_seq")"); The above line has quoting problems and an erroneous SELECT query, and it wouldn't work anyway because that's not the way to retrieve results from EXECUTE. Aside from that, EXECUTE isn't necessary in this case. Try this: new_id := currval(''mydata_id_seq''); -- Michael Fuhr ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster