On Sat, May 20, 2006 at 11:46:25AM +0200, Tomi NA wrote: > On 5/20/06, Martijn van Oosterhout <kleptog@xxxxxxxxx> wrote: > > >Seems you can't use a variable there. Your choices are to build a > >string and use EXECUTE, or just do: > > > >SELECT setval('sequence',value); > > The EXECUTE string solution did the job. Thank you very much, Martijn. As an FYI, the function version would be faster, since it can cache the plan. Though in this case it sounds like it doesn't matter one iota. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@xxxxxxxxxxxxx Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461