dbTalk Databases Forums  

Use sequense in Create Table

comp.databases.oracle.server comp.databases.oracle.server


Discuss Use sequense in Create Table in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
SouthVN
 
Posts: n/a

Default Use sequense in Create Table - 06-24-2003 , 11:43 PM






In Oracle 9.20.1.0, there is a error in " autoUid.nextval uid"

this is statement SQL:

create table AAA as
( select autoUid.nextval uid , makh, makh urs from thdt_tbt_20030401
where makh<='0117650'
)

--> The following error has occurred:

ORA-00923: FROM keyword not found where expected


That proplem is I want to create ALIAS for autoUid.nextval but
happended that error.

All Oracle expert !
Please help me !, thanks very much

Reply With Quote
  #2  
Old   
Anurag Varma
 
Posts: n/a

Default Re: Use sequense in Create Table - 06-25-2003 , 12:39 AM







"SouthVN" <nphuongtt (AT) yahoo (DOT) com> wrote

Quote:
In Oracle 9.20.1.0, there is a error in " autoUid.nextval uid"

this is statement SQL:

create table AAA as
( select autoUid.nextval uid , makh, makh urs from thdt_tbt_20030401
where makh<='0117650'
)

--> The following error has occurred:

ORA-00923: FROM keyword not found where expected


Problem is not your sequence .... UID is a reserved word in oracle.
see v$reserved_words for the list.

create table av as select 'x' uid from dual;
create table av as select 'x' uid from dual
*
ERROR at line 1:
ORA-00923: FROM keyword not found where expected

change your alias from uid to something like user_id or whatever!

HTH

Anurag




Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.