Creation of the database simple and simple error...

Create table GIFTS
(DonationID Number (1,1) Not Null,)
DonorID Number (1,1) Not Null,
EventID Number (1,1) Not Null,
ProjectID Number (1,1) Not Null,
Type of payment char (30) Not Null,
Gift amount Number (10) Not Null,


Primary Key (DonationID)
Foreign Key (DonorID)
Foreign Key (EventID)
Foreign Key (ProjectID)
);

Get the error ORA-00907: lack the right parenthesis

Any help will be greatly appreciated.

user8776250 wrote:
Create table GIFTS
(DonationID Number (1,1) Not Null,)
DonorID Number (1,1) Not Null,
EventID Number (1,1) Not Null,
ProjectID Number (1,1) Not Null,
Type of payment char (30) Not Null,
Gift amount Number (10) Not Null,

Primary Key (DonationID)
Foreign Key (DonorID)
Foreign Key (EventID)
Foreign Key (ProjectID)
);

Get the error ORA-00907: lack the right parenthesis

Any help will be greatly appreciated.

So many problems. And the error message points actually to where the problem is when you look at it in context:

SQL> --  original
SQL> Create table DONATIONS
  2  ( DonationID Number(1,1) Not Null,
  3  DonorID Number(1,1) Not Null,
  4  EventID Number(1,1) Not Null,
  5  ProjectID Number(1,1) Not Null,
  6  Payment Type Char(30) Not Null,
  7  Donation Amount Number(10) Not Null,
  8  Primary Key (DonationID)
  9  Foreign Key (DonorID)
 10  );
Payment Type Char(30) Not Null,
             *
ERROR at line 6:
ORA-00907: missing right parenthesis

SQL> -- fix one - remove the embedded space in column name 'payment type'
SQL> Create table DONATIONS
  2  ( DonationID Number(1,1) Not Null,
  3  DonorID Number(1,1) Not Null,
  4  EventID Number(1,1) Not Null,
  5  ProjectID Number(1,1) Not Null,
  6  PaymentType Char(30) Not Null,
  7  Donation Amount Number(10) Not Null,
  8  Primary Key (DonationID)
  9  Foreign Key (DonorID)
 10  );
Donation Amount Number(10) Not Null,
                *
ERROR at line 7:
ORA-00907: missing right parenthesis

SQL> -- fix two - remove the embedded space in column name 'donation amount'
SQL> Create table DONATIONS
  2  ( DonationID Number(1,1) Not Null,
  3  DonorID Number(1,1) Not Null,
  4  EventID Number(1,1) Not Null,
  5  ProjectID Number(1,1) Not Null,
  6  PaymentType Char(30) Not Null,
  7  DonationAmount Number(10) Not Null,
  8  Primary Key (DonationID)
  9  Foreign Key (DonorID)
 10  );
Foreign Key (DonorID)
*
ERROR at line 9:
ORA-00907: missing right parenthesis

SQL> -- fix three add comma after primary key
SQL> Create table DONATIONS
  2  ( DonationID Number(1,1) Not Null,
  3  DonorID Number(1,1) Not Null,
  4  EventID Number(1,1) Not Null,
  5  ProjectID Number(1,1) Not Null,
  6  PaymentType Char(30) Not Null,
  7  DonationAmount Number(10) Not Null,
  8  Primary Key (DonationID),
  9  Foreign Key (DonorID)
 10  );
)
*
ERROR at line 10:
ORA-00905: missing keyword

SQL> -- fix four - foreign key has to reference PK of another table
SQL> CREATE TABLE DONORS
  2  ( DONORID NUMBER(1, 1) NOT NULL ,
  3    DONORNAME NVARCHAR2(10),
  4    PRIMARY KEY (DONORID) VALIDATE )
  5  ;

Table created.

SQL> --
SQL> Create table DONATIONS
  2  ( DonationID Number(1,1) Not Null,
  3  DonorID Number(1,1) Not Null,
  4  EventID Number(1,1) Not Null,
  5  ProjectID Number(1,1) Not Null,
  6  PaymentType Char(30) Not Null,
  7  DonationAmount Number(10) Not Null,
  8  Primary Key (DonationID),
  9  Foreign Key (DonorID) REFERENCES DONORS (DONORID) VALIDATE )
 10  ;

Table created.

SQL> 

Tags: Database

Similar Questions

  • Creation of the database user and importing a DMP

    Hi all. I need help on this:
    1. creating a database
    2. create a user on my database created and the existing schema
    3. How do I import my DMP file.

    Any site that will respond to this will do.

    Thanks in advance

    http://docs.Oracle.com
    http://Tahiti.Oracle.com

  • Creation of the database for the HRMS 8.9 and 8.49 PT on SQL Server 2005

    Hello
    I have a problem when running database for HRMS 8.9 Wizard and 8.49 PT on SQL Server 2005. The wizard create the database, create and complete all tables but when trying to create the last display of the script produces this error

    Create view EO_MSGOWNRID_VW
    SQL mode: error 2: 16102
    End: Monday May 10 14:00:06 2009
    Unsuccessful end

    I reinstall HRMS database and run the wizard several times with the same result. I also install Service pack 3 to sql 2005 bu nothing...
    No idea what could be the problem?
    Thanks for the help
    Fernando

    user10990985 wrote:
    Hello
    I have a problem when running database for HRMS 8.9 Wizard and 8.49 PT on SQL Server 2005. The wizard create the database, create and complete all tables but when trying to create the last display of the script produces this error

    Create view EO_MSGOWNRID_VW
    SQL mode: error 2: 16102
    End: Monday May 10 14:00:06 2009
    Unsuccessful end

    The mistake is not on EO_MSGOWNRID_VW, but this point of view is the last of the build. You need to check the load log file and search for the string "SQL error" or something similar that indicate which view is currently in an error state. After your exit, two views creation failed.

    Nicolas.

  • Creation of the database - need help

    Hi all

    I am new to the creation of the database. We have a project starting early next month.

    The application acts as an interface to multiple users. A user will have access to its together authorized data.
    So, he/she can/don't should not access the data of other users. This is the scenario with all other users.

    We hope that we will have the large amount of data specific to each user. We have identified some ways to do this:

    1. create separate schemas for each user.
    2. create a unique layout and have a main table that will have all the details of the user. On this basis, the data will be created in the tables.
    3. do you have a unique layout and create partitions partitions/sup in the tables for each user.

    We have identified the above, with a minimum exposure of creation/maintenance of database. So, we do not know who would be the ideal way

    Can you please suggest the best thing to do here.

    Thanks in advance.

    If the data structure is exactly the same for all these users and the number of users is high, a better way is to its virtual private database. With DPV, you have a transaction data, but each user will have access to its own lines only.

    http://www.Oracle.com/technetwork/database/security/index-088277.html

    It is more extensible than the solutions you provided and are very transparent after the initial installation.

  • Try to install the Epson printer and scan - error msg application not compatible escndv is not compatible - I downloaded the drivers to day-help!

    Try to install the Epson printer and scan - error msg application not compatible escndv is not compatible - I downloaded the drivers to day-help!

    [Moved from the community centre of Participation]

    Try to install the Epson printer and scan - error msg application not compatible escndv is not compatible - I downloaded the drivers to day-help!

    [Moved from the community centre of Participation]

    Hello

    What version of Windows are you using?

    What is the model of the printer?

    See related thread

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-hardware/escndv-is-incompatible/a1521e27-f6dc-4c9c-B990-b98c721c74a1

    Have you tried to install the drivers using the Compatibility Mode?

  • creation of the database

    Hello

    database: oracle 11g
    OS: Linux

    How to create the database manually? which method is suggestable to the creation of the database (creation of dbca/manual)?

    Thank you
    Mike.

    How to create the database manually?

    example script:

    CREATE DATABASE mynewdb
    The USER SYS IDENTIFIED BY sys_password
    The USER IDENTIFIED BY system_password SYSTEM
    LOGFILE GROUP 1 ('/ u01/app/oracle/oradata/mynewdb/redo01.log') SIZE in the 100M.
    GROUP 2 ('/ u01/app/oracle/oradata/mynewdb/redo02.log') SIZE in the 100M.
    GROUP 3 ('/ u01/app/oracle/oradata/mynewdb/redo03.log') SIZE 100 M
    MAXLOGFILES 5
    MAXLOGMEMBERS 5
    MAXLOGHISTORY 1
    MAXDATAFILES 100
    CHARACTER SET US7ASCII
    NATIONAL CHARACTER SET AL16UTF16
    LOCAL MANAGEMENT MEASURE
    DATAFILE ' / u01/app/oracle/oradata/mynewdb/system01.dbf' SIZE 325 M REUSE
    SYSAUX DATAFILE ' / u01/app/oracle/oradata/mynewdb/sysaux01.dbf' SIZE 325 M REUSE
    DEFAULT TABLESPACE users
    DATAFILE ' / u01/app/oracle/oradata/mynewdb/users01.dbf'
    SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
    TEMPORARY TABLESPACE tempts1 default
    TEMPFILE ' / u01/app/oracle/oradata/mynewdb/temp01.dbf'
    RE-USE OF SIZE 20 M
    UNDO TABLESPACE undotbs
    DATAFILE ' / u01/app/oracle/oradata/mynewdb/undotbs01.dbf'
    SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

    which method is suggestable to the creation of the database (creation of dbca/manual)?

    Manual creation is the best.
    If you have no problems of GUI (DBCA) is an easy method.

    see below link for more information.
    http://docs.Oracle.com/CD/B28359_01/server.111/b28310/create003.htm

    Published by: KR10822864 on April 17, 2013 05:53

  • Error in the creation of the database of hot RMAN backup

    Hello

    I created the database at the time of the installation of Oracle software. Name AAA
    Now I took hot RMAN backup of database and after the fall of database.

    Now I want to restore the database again, but I am facing a problem.

    as: if I want to connect RMAN, $rman target / it gives error

    Recovery Manager: Release 10.2.0.1.0 - Production on Tue may 24 15:29:17 2011

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    RMAN-00571: ===========================================================
    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
    RMAN-00571: ===========================================================
    RMAN-00554: initialization of the package manager internal collection failed
    RMAN-04005: target database error:
    ORA-12560: TNS:protocol adapter error

    Please help to get me out of this problem.


    Regs,
    Brij

    See this topic and say if this can help

    http://forums.Oracle.com/forums/thread.jspa?threadID=2190328&TSTART=90

  • Error after the creation of the database

    Hello again,

    Oracle 11.2.0.1 database
    I created a database manually by using the DB_RECOVERY_FILE_DEST and DB_CREATE_FILE_DEST parameters.
    Run catalogue and catproc, attempted to restart the database, and I get in the alert file:

    ORA-00210: could not open the specified control file
    ORA-00202: control file: ' / u01/app/oracle/product/11/db/dbs/cntrlMYDB.dbf'
    ORA-27037: unable to get file status
    SVR4 error: 2: no such file or directory
    Additional information: 3
    ORA - 205 marked during: ALTER DATABASE MOUNT...

    What the heck is cntrl.dbf control file? I don't have the name of the control files, and above all, I wouldn't put one in the dbs directory.

    Thanks for the help!

    The docs say

    http://download.Oracle.com/docs/CD/E11882_01/server.112/e10595/omf003.htm#i1006324

    -----------
    Sybrand Bakker
    Senior Oracle DBA

  • Involved in the creation of the database in PeopleSoft FSCM

    Hi all


    I am creating the peoplesoft FSCM 9.2.I for database have followed the steps outlined in the document to install oracle (peopleTools version 8.54). I had the problem when I try to connect like application designer "EBU Invalid ID and password for sign. I can able to connect using Data Mover SYSADM/SYSADM.

    I have run the grant.sql query too. Please tell how to solve these errors. I created the db twice, but no luck, I got the same problem.

    I doubt that there is any some Userid for FSCM (Say VP1),because I have procedure step by step the document they say for user ID FSCM is VP1. But in dbowner.sql it look like as follows

    DBOwner.SQL

    ------------------

    set echo on

    coil dbowner.log

    GRANT DBA TO PS IDENTIFIED BY PS;

    CONNECTION PS/PS;

    CREATE TABLE PSDBOWNER (DBNAME VARCHAR2 (8) NOT NULL, OWNERID VARCHAR2 (8) NOT NULL) TABLESPACE PSDEFAULT;

    CREATE A UNIQUE PS_PSDBOWNER ON PSDBOWNER (DBNAME) INDEX TABLESPACE PSDEFAULT;

    CREATE THE PSDBOWNER FOR PSDBOWNER PUBLIC SYNONYM;

    System/CONNECTION Manager;

    REVOKE DBA OF THE PS;

    ALTER USER QUOTA UNLIMITED ON PSDEFAULT PS;

    spool off

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    "Please tell me if I need to change the" 'PS " as"VP1 "in file above. ? If it's like me please where are all the place, I have to change "PS" as "VP1. And when during the installation of the database as asking for Application Server ID Application Server and Password.Please tell what I want to give "PS" or "VP1"? Untitled.png

    Please help resolve this error. Sorry if I misunderstood any procedure.

    I think you need some basic knowledge of first before going any further in the installation.

    SYSADM is the owner of the user Oracle Peoplesoft objects (tables, views,...), you can connect to SGD but will be "bootstrap" mode only. It cannot be used for AppDesigner connection.

    PS is a locked user account Oracle hosting only arrays of connection security. It cannot be used for any connection of DMS or AppDesigner application.

    VP1 is a user of the application. It cannot be used for Oracle, only DMS/AppDesigner connection. If you turn on all counts with the default password of the screenshot that you has shown, it should be able to connect to the application.

    Server application ID is used to manage the application server, defined in the configuration file of the application server.

    Sorry to move, but you really must go through the documentation official http://docs.oracle.com/cd/E55418_01/psft/html/docset.html

    In particular: http://docs.oracle.com/cd/E55418_01/psft/acrobat/Getting_Started_on_PeopleSoft_Installation_072014.pdf and http://docs.oracle.com/cd/E55418_01/psft/acrobat/PeopleTools_8.54_Installation_for_Oracle_072014.pdf

    I also explained something like several years there on my blog and always topical: on the road to Peoplesoft: on the road to Peoplesoft: creation of the Peoplesoft database

    Nicolas.

  • on the creation of the database in Peoplesoft.

    Hello..

    I'm trying to create the database using scripts provided by peoplesoft HRMS9.
    FYI, I did install Tuxedo 9.1, 9.2, of webserver PeopleTools8.49 and HRMS 9. I use Oracle 11 g 1 material on Oracle Enterprise Linux 5.3

    Well, I read on Annex B to Enterprise PeopleTools 8.49 Installation for Oracle and some Web sites.
    I modified createdb10.sql, utlspace.sql. I ran these scripts and the database has been created.

    Well, when I ran dbowner.sql I got an error. I run as the owner of oracle and login in as sysdba.

    SQL > CONNECT PS/PS;
    Access to the PRODUCT_USER_PROFILE error
    WARNING: Product user profile information has not loaded!
    You may need to run PUPBLD. SQL as SYSTEM
    Connected.

    so I ran PUPBLD. SQL first. And then I run dbowner.sql. But the error still occurred. I read of this http://psst0101.wordpress.com/2009/01/21/step-by-step-virtual-ps-install-database-creation/

    Any suggestions please, because I read in http://gasparotto.blogspot.com/ he ran not pupbld.sql but managed.

    Anyone has same experience... ??

    What is the default tablespace of the PS?
    Please do the following and post the result:

    select * from dba_users where username='PS';
    

    Anyway, do not worry, the create session privilege is revoked in p.
    Finally, you can try to run this script (PUPBLD. SQL) in the SYSTEM, not as a SYS.

    Nicolas.

  • Creation of the database crashed

    Hello

    I try to install RAC with 2 OEL 5.8 knots.

    GI 11.2.0 is installed
    The installation of the database crashed in the dbca Wizard.

    When I tried to restart, I got:
    PRCD-1121: Speciffied RAC RAC Server Pool hosts one
    managed by administrator configuration for RAC databases

    Thanks for your help

    Hello

    that means srvctl config database shows? you did not indicate at what stage database creation failed / crashed.

    Check the alert.log to exact status and above the exit command to see why his complaining.

    Thank you
    Krishan

  • Creation of the "walls" quickly and precisely in Illustrator

    Hello.

    I'm a 3D artist, but recently due to popular demand, I am learning Illustrator for the sole purpose to make floor plans (those colorful artistic), I am very familiar with Photoshop and use it extensively, it would be certainly enough if I wasn't going to print the plans in multiple dimensions, even using smart objects and vectors I don't think Photoshop is the tool for the job.

    I downloaded illustrator and so far I'm liking it a lot, I think it's the right tool for the job. However, I couldn't find a quick way to draw the walls with precision.

    The biggest problem is that I couldn't find a way to 'offset' paths open quickly... when the way is open, it compensates the lines on both sides, as opposed to the closed roads, the way I found is to use the Scout to split shifts to remove the ones I don't want , but it's a pain, it is better to just draw the sides of the walls separately instead, which is a tedious process too.

    I'm looking for simple ways to offset paths open to a specific aspect, or maybe make some traits that are adjacent to the paths, so I can use the tool 'contour Contour"to convert them into 'solid' paths, or another way to get the same result.

    I know that Illustrator is no CAD program, but I don't think I asked too much of him.

    Thanks in advance.

    Way the easiest way is via the width tool.

    Just use the width tool and Option/Alt click at the ends of the path and drag the marker width up to the path. This creates the line on one side of the path:

    Once you do this, you can save the profile of the race:

    Then apply just select the profile in the Panel of the stroke or the control bar.

    Illustrator centers inherently strokes on all open paths. There is no other way to offest stroke I know.

  • Query running beside the database successfully but in error in the procedure!

    Hi all

    I'm something get odd errors on in ODI 11 g.

    When I run the query to the database, it performs very well, and it creates a table.
    But when encorporate this query in the procedure, it gives me following error.

    ODI-1228: PROC_POZ_BOSS_OMP_BOSSWORKORDER (procedure) has failed on the staged target of connection ORACLE ODI POZ.
    Caused by: java.sql.SQLDataException: ORA-01843: not one month valid

    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:79)

    I am convert Char to the data types Date in the Code.

    Details of the DB: - Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
    ODI Details:-Standalone Edition Version 11.1.1
    Build ODI_11.1.1.3.0_GENERIC_100623.1635

    What would be the reason for query next to the DB with success but in error next to the ODI?
    I'm really confused... :(
    Help me how can I fix this error?

    Hi Manu
    I think that I've already advised the same thing in your previous thread. It could be because NLS_DATE_FORMAT.
    Something weird situation while running the interface in ODi

    Thank you.

  • Creation of the database by using the command prompt

    Hi all

    When I tried to create the database through comand prompt, up to the stage business nomount , that it went well after that when I published create database command

    The following error occurred

    * ERROR at line 1:
    ORA-01092: ORACLE instance is complete. Disconnection forced *.


    Help, please... I checked the log of alerts and I even google, could not find...

    Kind regards
    VAMSi.

    as mentioned above, changing the size of sysaux and longer system data file will solve the problem.

    also modify the undo tablespace or in name create pfile from your database or database script.

    hope this helps you.

  • Could not save to the database. MODE = UPGRADE error

    Hello world

    I get the following error when you try to save a custom database wft file

    1602: cannot save.
    1400: can not save to the database. MODE = UPGRADE EFFDATE = 2009-09-15 08:58:07
    1404: Please first loading this entity or check protect and customize the level of ITEM_TYPE 'XXXXPT '.

    We use the following:
    WF = 2.6.3.5 generator
    Version of WF = 2.6.0 (based on select text of the wf_resources where name = "WF_VERSION")

    Oracle Apps 11.5.10
    Oracle DB 10.1.0.4.0

    I tried to set the access level to zero (0), but the same error appeared.
    I use the correct version of the constructor?

    I appreciate if you can give help and ideas on that.

    Thank you
    Elmer

    PL see if MOS Doc 272897.1 (' error 1602 ': can not save "occurs when trying to save Supptest26 in Workflow Builder) can help

    HTH
    Srini

Maybe you are looking for