Problem with curval
От | Mike Fahey |
---|---|
Тема | Problem with curval |
Дата | |
Msg-id | 419386D5.9060502@enter.net обсуждение исходный текст |
Ответы |
Re: Problem with curval
|
Список | pgsql-odbc |
This wont work because myvalue must be a record or row variable. I'm guessing its nearly impossible to get the last inserted id from access 2003 using postgres odbc. select @@IDENTITY always returns "2". Thoughts? create function last_insert_id(varchar,varchar ) returns integer as ' declare intable alias for $1; incolumn alias for $2; myvalue integer; BEGIN for myvalue in execute '' select currval('''' '' || intable || ''_'' || incolumn || ''_seq'''') '' Loop return myvalue; END loop; END; ' language plpgsql; -- With best regards, Mike Fahey - Systems Administration ******************************************************************** ENTER.NET - "The Road to the Internet Starts Here!" (tm) (610) 437-2221 * http://www.enter.net/ * email:support@enter.net ********************************************************************
В списке pgsql-odbc по дате отправления: