Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 07:25 AM
praveen0727
Guest
 
Posts: n/a
Default using sequence in select queries

I created a sequence using the query "create sequence admin.seqbcpos
minvalue 1 increment by 1". It got created successfully. when I used it in
insert statement "insert into admin.temp values(nextval('seqbcpos'), null,
null)", it is giving the following error.
SQL0440N No authorized routine named "NEXTVAL" of type "FUNCTION
" having
compatible arguments was found.

please let me know how to solve it.

  #2  
Old November 12th, 2005, 07:25 AM
Serge Rielau
Guest
 
Posts: n/a
Default Re: using sequence in select queries

Seemtimes reading the manual helps:
http://publib.boulder.ibm.com/infoce...n/t0004993.htm
NEXTVAL FOR seqbcpos
If you are on DB2 V8 you should actually use:
NEXT VALUE FOR seqbcpos
That is SQL Standard compliant.

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,248 network members.