Missing right parent while creating table.

I get the "ORA-00907: missing right parenthesis" error while creating the table with the code below.
create table SALES_ORDER
ORDERNO varchar2(6) Primary key check(ORDERNO like 'O%'),
CLIENTNO varchar2(6) foreign key references CLIENT_MASTER(CLIENTNO),
ORDERDATE date not null,
DELYADDR varchar2(25),
SALESMANNO varchar2(6) foreign references SALESMAN_MASTER(SALESMANNO),
DELYTYPE char(1) default 'F' check(DELYTYPE IN('P','F')),
BILLYN char(1),
DELYDATE date check(DELYDATE >= ORDERDATE),
ORDERSTATUS varchar2(10) check(ORDERSTATUS IN('In Process','Fulfilled','BackOrder','Cancelled'))
What am i doing wrong?

Hi,
1003332 wrote:
The solution in the first reply worked.
The problem was i think with both the 'reference statement' as well as the 'check condition'.
As pointed out in the solution the 'check(DELYDATE >= ORDERDATE)' constraint was referencing another column.
So i removed the check and it worked.
But i still don't know how to implement the "DELYDATE >= ORDERDATE" condition!
Would be helpful if someone could tell how?You can find the syntax and examples in the SQL Language manual
A constraint that references more than 1 column can't be attached to one of the columns; it has to be defined as a table-level constraint, like the one at the end of this command:
create table SALES_ORDER
    ORDERNO     varchar2 (6)     Primary key     
                             check (ORDERNO like 'O%'),
    CLIENTNO     varchar2 (6)      references CLIENT_MASTER (CLIENTNO),
    ORDERDATE     date                not null,
    DELYADDR     varchar2 (25),
    SALESMANNO     varchar2(6)     references SALESMAN_MASTER (SALESMANNO),
    DELYTYPE     char (1)          default 'F'      
                                  check (DELYTYPE IN ('P','F')),
    BILLYN     char (1),
    DELYDATE     date,
    ORDERSTATUS varchar2 (10)     check (ORDERSTATUS IN ('In Process','Fulfilled','BackOrder','Cancelled')),
    CONSTRAINT  sales_order_date_ck
                    check (DELYDATE >= ORDERDATE)
);As you can see, this can be done in the CREATE TABLE statement; use an ALTER TABLE statement only if you want to.

Similar Messages

  • Error while creating table "EDISEGMENT' entry 'BIC/CIBA0PLANT_ATTR

    While loading master data for 0PLANT, its giving me following error.
    "error while creating table "EDISEGMENT' entry 'BIC/CIBA0PLANT_ATTR"
    Please help me out.
    Thanks

    steve,
    Can you give the solution you used to correct this problem?
    This error occurred in BW during import.
    Raj.

  • Error while creating table maintenance generator

    Hi,
    I am getting below error while creating table maintenance generator.
    Screen SAPLZtest   0002 could not be generated.   In DYNPFIELD_ATTR field LENGTH has the invalid value 241.
    Reason for that error might be:
    In the table I have a field with a dataelement(customized) of type Char and length 241.
    But in the other table Iam using the standard data element(standard) of same type(241 char).In this table Iam able to create table maintenance generator without any errors.
    And the domain Iam using is same for both the tables.
    Please help me to solve this.
    Thanks in advance,
    Sravanthi

    Hi,
    you can go to transaction se51 and go your screen. active it.. you can find thesolution.
    refer these links..
    Error in table control
    Error while creating table maintainence generator !
    Thanks and Regards,
    Ahamed.

  • Source sys Restore "error while creating table EDISEGMENT "

    Dear All,
    I am Basis person and recently we have refreshed data of Test BI system from Development BI system. we normally carry out these Refresh but In this case we have also changed Hostname and SID for Test BI system.
    We have done all BW refresh steps as per guide and during Restore of source system we
    are getting errors during datasource activation as  " error while creating table EDISEGMENT ".
    we have checked RFC and Partner profiles and working fine.
    We have 2 clients connected from source system to our Test BI box.strange thing is we got one source system activated without any errors and for second
    source system we are getting above mentioned error.
    We have reviewed notes 339957 , 493422 but our BI fuctional team is not sure whether
    those apply to our OLTP system , as one source system from same OLTP system got
    successfully activated and source system for other client giving this issue .
    Please help us out with this problem.
    we are running on BI 7.0 platform and ECC 6.0 for source.
    Regards,
    Rr

    check the relevant profiles in We20 t code and also in sm59 if the remote connection with autorisation is sucssessfull, connection is ok otherwise you need to check th paramters.
    hope this helps
    regards
    santosh

  • Erro: "Error while creating table 'EDISEGMENT'"

    Pessoal bom dia,
    quando eu vou Ativar uma Regra de Transferência retona o seguinte erro:
    Error while creating table 'EDISEGMENT'
    não estou conseguindo desvendar o que pode ser isto, e a regra não ativa de jeito nenhum.
    Alguém já passou pelo problema?

    Please post this in the Portuguese Forum...
    Regards
    Juan

  • Error: "Error while creating table 'EDISEGMENT'"

    Hi,
    When I activate a Transfer Rule return the following error:
    Error while creating table 'EDISEGMENT'
    Someone has passed the problem?

    Bom dia Marques,
    Na SAP Note 339957 tem o síntoma descrito por você.
    Solução:
    In the system where the error occurs (usually the OLTP), create and run the report RS_CHECK_TS_EDISEGMENT (with SENDING and RECEIVING LOGSYS as an entry).
    Entretanto esta nota foi substituida pela SAP Note 493422, com bem mais detalhes e indica um programa Z
    Atenciosamente,
    Fernando Da Rós
    PS: Fórum em português.

  • Error while creating table 'EDISEGMENT' entry for Transfer Structures

    Hi Guyz...
    I've been facing a few issues regarding activation of transfer structures.
    I'll explain the whole process...so it makes sense to you guys.
    I've initially activated the Transfer Structures in BI Content for Master Data. Later on we faced some issues in the DEV server. So we had to transport all the objects and store them locally on a temporary location. When the BI DEV sever, was up and running, we transported all the objects back to the server.
    Now while moving the objects back to the sever. We had an errors in the Master Data Request (Log- Method Execution). After going into the log...this is what I found.
    Error while creating table 'EDISEGMENT' entry '/BIC/CIIA0DIVISION_TEXT'
    Error while creating table 'EDISEGMENT' entry '/BIC/CIIA0DISTR_CHAN_TEXT'
    Error while creating table 'EDISEGMENT' entry '/BIC/CIIA0MATL_TYPE_TEXT'
    Error while creating table 'EDISEGMENT' entry '/BIC/CIIA0SALESORG_TEXT'
    Error while creating table 'EDISEGMENT' entry '/BIC/CIIA0SALES_GRP_TEXT'
    I hope, I am clear here.
    Any suggestions, guys...
    Thanks,
    Regards,
    G

    Hi,
    Please check this link:
    Error while creating table EDISEGMENT entry
    Hope it helps.
    Thanks and Regards,
    MuraliManohar.

  • Error while creating table 'EDISEGMENT' entry '/BIC/CIBD0BILBLK_DL_TEXT'

    Hi All,
    I am getting a error"Error while creating table 'EDISEGMENT' entry", when running the program RS_Transtru ActivateAll to activate the transfer rules as we had reconnected our source system,
    we are on 2004s server and on SP level 17, I understand that this issue is created as the transfer rules are using IDOC as transfer method, and I Cannot manually change the transfer method to PSA and activate  as the number of transfer rules with this  issue are huge in number.
    Please suggest the suitable solution
    Thank you in advance
    krishna
    Edited by: krishna dvs on Feb 17, 2009 1:24 PM

    Hi,
    Please check the note 493422. The reports listed in the note
    should correct the inconsistencies and afterwards you can re-import the
    request and it should then work.
    Regards,
    Srikanth

  • Error while creating table 'EDISEGMENT' entry '/BIC/CIWA0TRZONE_TEXT'

    Hi experts,
    when I import my transport request to QA, I am getting this error
    "Error while creating table 'EDISEGMENT' entry '/BIC/CIWA0TRZONE_TEXT'"
    the performance assistance reads as below..
    Message no. EA201
    Diagnosis
    An attempt was made to create the entry '/BIC/CIWA0TRZONE_TEXT' in table 'EDISEGMENT'. The attempt failed.
    System response
    The operation was canceled.
    Procedure
    Please check whether the relevant entry already exists
    I have an entry for '/BIC/CIWA0TRZONE_TEXT'  in the table 'EDISEGMENT' do need to delete it before importing the transport. How to delete this entry, I donot see the options in SE11 /SE16..
    thanks in advance
    D Bret

    Hi,
    can you please be more precise with your enquiry?
    As far as I read the note, it is quite explanatory....
    What is your source system release?
    You'll need to implement this prog in your source system and execute it there.
    If everything works and is fine, import to program in your QA/PROD source systems and rexecute it as specified in the note...
    does it answer your question
    Olivier.

  • Error while creating table 'EDISEGMENT' entry '/BIC/CIBB0DISTR_CHAN_TEXT'

    When I am activating the transfer rules of 0divison_text giving me the error
    Error while creating table 'EDISEGMENT' entry '/BIC/CIBB0DISTR_CHAN_TEXT'
    Message no. EA201
    Diagnosis
    An attempt was made to create the entry '/BIC/CIBB0DISTR_CHAN_TEXT' in table 'EDISEGMENT'. The attempt failed.
    System Response
    The operation was canceled.
    Procedure
    Please check whether the relevant entry already exists.
    I have checked the note 493422 but I did not understand it can any one help me in this
    I am  working on 7.o with  SP SAPKW70010

    Hi Priya,
    Delete entries for the data source in ROOSGEN,  EDISEGMENT and EDSAPPL tables, both on ECC and BI sides.
    Try activating the infosource again.  This should solve your problem.
    Sasi

  • Error while creating table 'EDISEGMENT' entry '/BIC/CIAC0CLASS_NUM_TEXT'

    Hello,
    I get the error message:
    "Error while creating table 'EDISEGMENT' entry '/BIC/CIAC0CLASS_NUM_TEXT'"
    when trying to activate my inactive transfer structure for 0CLASS_NUM_TEXT..
    Many other transfer structures work fine, but this one is really problematic.
    Has anyone seen it before? What do i do to solve it?
    Regards,
    F C

    Hi,
    Please check the note 493422. The reports listed in the note
    should correct the inconsistencies and afterwards you can re-import the
    request and it should then work.
    Regards,
    Srikanth

  • Dbms_xmlschema.registerschema, (ORA-31084: error while creating table )..

    Hello,
    I have some problems with dbms_xmlschema.registerschema
    My database is: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    My XSD schema is (SEPA pain.002.001.03.xsd) also available on this url: http://code.google.com/p/leontestbed/source/browse/trunk/bc2/sample/Schema/pain.002.001.03.xsd?r=241
    After
    begin
       DOK_XML_UTIL.p_vnesi_xsd_blob(401941242); -- store a XSD on file system from blob field
       dbms_xmlschema.registerschema(
        schemaurl => 'http://localhost/TEST1.XSD',
        schemadoc => bfilename('ETAX_LOAD','TEST1.XSD'),
        csid => nls_charset_id('AL32UTF8'));
    commit;
    end;I get:
    ORA-31084: error while creating table "INIS_PROD"."Document2781_TAB" for element "Document"
    ORA-02320: failure in creating storage table for nested table column "XMLDATA"."CstmrPmtStsRpt"."OrgnlPmtInfAndSts"
    ORA-01792: maximum number of columns in a table or view is 1000
    ORA-02310: exceeded maximum number of allowable columns in table
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 37
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 65
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 136
    ORA-06512: at line 4
    What I'am doing wrong or what is the reason for this error..

    Arrgghhh.....
    begin
       DOK_XML_UTIL.p_vnesi_xsd_blob(401941242);
       dbms_xmlschema.registerschema(
        schemaurl => 'http://localhost/TEST1.XSD',
        schemadoc => bfilename('ETAX_LOAD','TEST1.XSD'),
        csid => nls_charset_id('AL32UTF8')
        , local => true
      , genTypes => false
      , genTables => false);
    commit;
    end;sorry...

  • While creating Table it shows error as 'missing or invalid option

    I had log on to ap/ap@vis in sqlplus and try to create table but showing error.....here below is the table
    Create table Purchase_Order
    (Item varchar2(10),
    Item_Desc varchar2(100),
    Item_Cost Number(7),
    Item_Qty Number(7),
    Item_Date Date,
    Need_by_date date,
    Last_updated_date date,
    last_updated_by number(10),
    creation_date date,
    created_by number(10),
    Attributed_category varchar2(100),
    attribute1 varchar2(100),
    attribute2 varchar2(100),
    attribute3 varchar2(100),
    attribute4 varchar2(100),
    attribute5 varchar2(100),
    attribute6 varchar2(100));
    But it showing error as ORA-00922:missing or invalid option

    It works for me
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> Create table Purchase_Order
      2  (Item varchar2(10),
      3  Item_Desc varchar2(100),
      4  Item_Cost Number(7),
      5  Item_Qty Number(7),
      6  Item_Date Date,
      7  Need_by_date date,
      8  Last_updated_date date,
      9  last_updated_by number(10),
    10  creation_date date,
    11  created_by number(10),
    12  Attributed_category varchar2(100),
    13  attribute1 varchar2(100),
    14  attribute2 varchar2(100),
    15  attribute3 varchar2(100),
    16  attribute4 varchar2(100),
    17  attribute5 varchar2(100),
    18  attribute6 varchar2(100));
    Table created.
    SQL>

  • ORA - 00922 Missing or Invalid option error while creating table

    I am tryin to create a table with the following syntax
    1 CREATE TABLE TEST_FOR_SCRIPT (
    2 TEST_A NUMBER NOT NULL
    3 ,TEST_B VARCHAR2(30) DEFAULT 'UNDEFINED' NOT NULL
    4 )
    5* @storage_parms_table_cmn
    6 /
    @storage_parms_table_cmn
    ERROR at line 5:
    ORA-00922: missing or invalid option
    Here, storage_parms_table_cmn.sql reads like this
    tablespace DBK_CMN_DATA
    Can anyone please guide me how to overcome this error.

    What is your Oracle Version?
    i can do it exactly what you did without error
    sql> CREATE TABLE vd.TEST_FOR_SCRIPT (
    2 TEST_A NUMBER NOT NULL
    3 ,TEST_B VARCHAR2(30) DEFAULT 'UNDEFINED' NOT NULL
    4 )
    5 @test1.sql
    6 /
    Table created.
    Cheers
    http://fiedizheng.blogspot.com/

  • Error while creating table

    Hi,
    I am getting an error while creating a table,
    create table cs_temp_xml_data as select rowid RW_ID, value(d).getClobVal() xml_value FROM cs_tmp_wcl_xml_data p,table(xmlsequence(extract(p.xml_data,'/records/record'))) d ;
    Here cs_tmp_wcl_xml_data contains a data of 600 mb in oracle directory
    ORA-04030: out of process memory when trying to allocate 4000 bytes (qmxlu subheap,qmemNextBuf:alloc)
    Can anyone help me out regarding this error?

    check out metalink doc: 543239.996
    also bug 3436395.

Maybe you are looking for

  • Is there an upgrade path from Final Cut Studio 3.0 to Final Cut Pro X?

    Is there an upgrade path from Final Cut Studio 3.0 to Final Cut Pro X ?

  • Rep - 1223  (Invalid Page Size)/Urgent

    Hi, I has developed a report in character mode.Then i save the report.In order to have a precise alignment i then changed the design in character units property to Yes.After some time,while running the report it gave an error Rep - 1223 (Invalid Page

  • Barcodes and QR codes

    Hi guys, My company is looking to implement Barcodes or QR codes to manage hardware inventory. We've just started using SCCM and I was just wondering if anybody is using a QR Code solution with conjunction with SCCM 2012?

  • Opening an iMovie DVD in Windows XP

    A friend sent me a DVD that he created in iMovie. He said that he captured the DV tape from the camcorder directly into iMovie and then burned a DVD-R of the clips. In Windows XP, the DVD-R disk just shows, Clip 01, Clip 02, ..., without any extensio

  • How to Uninstall iTunes (for installing it latter)

    How to Uninstall iTunes from my Mac (for installing it latter)