Dynamic sql giving error --please help

Hi ,
I have written the following code --
CREATE OR REPLACE FUNCTION tabcount (
tab IN VARCHAR2, field IN VARCHAR2 ,whr IN VARCHAR2)
RETURN INTEGER
IS
retval INTEGER;
BEGIN
DBMS_OUTPUT.PUT_LINE ('whr' ||whr);
DBMS_OUTPUT.PUT_LINE ('field1' ||field);
EXECUTE IMMEDIATE
' SELECT COUNT(*) FROM ' || tab ||
' WHERE ' || field || 'like '/'%'||whr ||'%'/''
INTO retval;
DBMS_OUTPUT.PUT_LINE ('countis!' ||retVal);
RETURN retval;
END tabcount;
It is giving the following error--
ORA-00920: invalid relational operator
ORA-06512: at "TABCOUNT", line 10
ORA-06512: at line 2
I am not sure how to enclose the like operator within the single quotes.Double quotes is not working for me.
Thanx in advance,
Ira

Offhand, it looks like you may still have some syntax problems -- probably need a blank space before the WHERE --maybe some other stuff too.
What you need to do to debug it is this (and this works just about anytime you are having trouble with dynamic SQL):
1. store the sql statement in a variable.
2. Use DBMS_OUTPUT to display your select statement BEFORE calling execute immediate.
3. copy/paste that select into a separate window and run/debug it.
4. Once you know what is wrong with that statement, go back and fix the code accordingly.
Have fun,
--scott                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Dynamic Sql giving error

    Hi,
    I am creating a BIP report and it is giving an issue on generating Data XML in OTM application.
    The Report XML is simple query and taking input parameter for shipment_gid, the parameter is handled in SET_LEXICAL_PARAMETER to add where clause and append “=” with the passed value of parameter &P_SHIPMENT_GGID.
    When I try to generate data XML in Query template, it is giving below error
    java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended
    I have tried to change parameter in many ways in SET_LEXICAL_PARAMETERS, but still getting error. Please check the XML and package and advice.
    XML
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <dataTemplate name="pri_sec_ocean_fcl_booking_view" defaultPackage="pri_sec_ocean_fcl_booking_view" version="1.0">
    <properties>
    <property name="xml_tag_case" value="upper" />
    </properties>
    <parameters>
    <parameter name="P_GL_USER" dataType="character" defaultValue="ULE.ADMIN" />
    <parameter name="P_ROLE_ID" dataType="character" defaultValue="ADMIN" />
    <parameter name="P_L_SHIPMENT_GGID" dataType="character" defaultValue="1=1" />
    </parameters>
    <lexicals />
    <dataQuery>
    <sqlStatement name="Q_1">
    <![CDATA[SELECT
                             CT.FIRST_NAME||' '||CT.LAST_NAME||' Email '||CT.EMAIL_ADDRESS||'PHONE1 '||CT.PHONE1||'PHONE2 '||CT.PHONE2 BOOKER_ID
                   FROM      SHIPMENT_INVOLVED_PARTY SH,
                             CONTACT CT
                             &P_L_SHIPMENT_GGID
                   AND        SH.INVOLVED_PARTY_QUAL_GID               =     'CARRIER_BOOKING_OFFICE'
                   AND          SH.INVOLVED_PARTY_CONTACT_GID          =     CT.CONTACT_GID
       ]]>
    </sqlStatement>
    </dataQuery>
    <dataTrigger name="afterParameterFormTrigger" source="pri_sec_ocean_fcl_booking_view.afterpform" />
    <dataTrigger name="beforeReportTrigger" source="pri_sec_ocean_fcl_booking_view.beforereport" />
    <dataStructure>
    <element name="P_L_SHIPMENT_GGID" dataType="varchar2" value="pri_sec_ocean_fcl_booking_view.P_L_SHIPMENT_GGID" />
    <group name="G_1" dataType="varchar2" source="Q_1">
    <element name="BOOKER_ID" dataType="varchar2" value="BOOKER_ID"/>
    </group>
    </dataStructure>
    <dataTrigger name="afterReportTrigger" source="pri_sec_ocean_fcl_booking_view.afterreport()" />
    </dataTemplate>
    Package
    create or replace PACKAGE pri_sec_ocean_fcl_booking_view IS
    DESNAME VARCHAR2(200);
    DESTYPE VARCHAR2(100);
    DESFORMAT VARCHAR2(200):='PDF';
    P_GL_USER VARCHAR2(128);
    P_ROLE_ID VARCHAR2(1000);
    P_DATABASE_CONN_STRING VARCHAR2(50);
    P_FILE VARCHAR2(100);
    P_PDF_HYPERLINK VARCHAR2(1000);
    P_REPORT_GID VARCHAR2(101);
    P_XML_HYPERLINK VARCHAR2(1000);
    P_DOMAIN VARCHAR2(50);
    P_KEEP_FILE_FLAG VARCHAR2(1);
    P_LANGUAGE_ID VARCHAR2(30);
    P_RPT_JOB NUMBER;
    P_FORMAT VARCHAR2(40);
    P_DATE_FORMAT VARCHAR2(15);
    P_TIME_FORMAT VARCHAR2(32767);
    P_REPORT_CALL VARCHAR2(1000);
    P_GLOG_USER VARCHAR2(30);
    P_GLOG_USER_PASS VARCHAR2(30);
    P_REPORT_PHYSICAL_NAME VARCHAR2(100) := 'PRI_SEC_OCEAN_FCL_BOOKING_VIEW';
    P_WITHIN_REPORT VARCHAR2(1);
    P_REPORTS_OUT_DIR VARCHAR2(100);
    P_REPORTS_SERVER VARCHAR2(100);
    P_SHIP_START_RANGE DATE;
    P_SHIP_END_RANGE DATE;
    P_GROUP_BY VARCHAR2(2000);
    P_REP_USERID VARCHAR2(100);
    P_L_SHIPMENT_GGID VARCHAR2(32766) := '1=1';
    P_L_CONTAINER_NUMBER_WHERE VARCHAR2(32766) := '1=1';
    P_H_CONTAINER_NUMBER VARCHAR2(32766);
    FUNCTION P_FORMATVALIDTRIGGER(DESTYPE IN VARCHAR2) RETURN BOOLEAN;
    FUNCTION BEFOREREPORT RETURN BOOLEAN;
    FUNCTION AFTERREPORT RETURN BOOLEAN;
    FUNCTION BEFOREPFORM RETURN BOOLEAN;
    FUNCTION AFTERPFORM RETURN BOOLEAN;
    FUNCTION P_SHIP_END_RANGEVALIDTRIGGER RETURN BOOLEAN;
    FUNCTION VALUE_ENTERED(LEX_NAME IN VARCHAR2) RETURN BOOLEAN;
    PROCEDURE SET_LEXICAL_PARAMETERS;
    END PRI_SEC_OCEAN_FCL_BOOKING_VIEW;
    create or replace
    PACKAGE BODY PRI_SEC_OCEAN_FCL_BOOKING_VIEW IS
    FUNCTION P_FORMATVALIDTRIGGER(DESTYPE IN VARCHAR2) RETURN BOOLEAN IS
    BEGIN
    IF DESTYPE = 'Cache' AND P_WITHIN_REPORT = 'N' THEN
    IF P_FORMAT = 'View PDF' THEN
    DESFORMAT := 'PDF';
    ELSIF P_FORMAT = 'View HTML' THEN
    DESFORMAT := 'HTMLCSS';
    END IF;
    END IF;
    RETURN (TRUE);
    END P_FORMATVALIDTRIGGER;
    FUNCTION BEFOREREPORT RETURN BOOLEAN IS
    BEGIN
    REPORTS_LIBRARY.SET_VPD(P_GL_USER);
    /*SRW.SET_BEFORE_REPORT_HTML(SRW.TEXT_ESCAPE
    ,BUILD_HTML_HEADER)*/NULL;
    /*SRW.SET_AFTER_REPORT_HTML(SRW.TEXT_ESCAPE
    ,BUILD_HTML_FOOTER(P_REPORT_GID
    ,P_LANGUAGE_ID))*/NULL;
    RETURN (TRUE);
    END BEFOREREPORT;
    FUNCTION AFTERREPORT RETURN BOOLEAN IS
    BEGIN
    REPORTS_LIBRARY.SET_VPD(P_GL_USER);
    IF DESTYPE = 'File' THEN
    RPT_GENERAL.P_INSERT_LOG(P_FILE
    ,P_REPORT_GID
    ,P_RPT_JOB
    ,P_GL_USER
    ,P_DOMAIN);
    END IF;
    RETURN (TRUE);
    END AFTERREPORT;
    FUNCTION BEFOREPFORM RETURN BOOLEAN IS
    BEGIN
    REPORTS_LIBRARY.SET_VPD(P_GL_USER);
    /*SRW.SET_AFTER_FORM_HTML(SRW.TEXT_ESCAPE
    ,BUILD_AFTER_FORM_HTML)*/NULL;
    RETURN (TRUE);
    END BEFOREPFORM;
    FUNCTION AFTERPFORM RETURN BOOLEAN IS
    V_STRING VARCHAR2(32750);
    WS_DATE VARCHAR2(30);
    V_BOOLEAN BOOLEAN;
    BEGIN
    REPORTS_LIBRARY.SET_VPD(P_GL_USER);
    V_BOOLEAN := REPORTS_LIBRARY.GET_USER_PREFERENCES(P_GL_USER,P_ROLE_ID
    ,P_DATE_FORMAT
    ,P_TIME_FORMAT
    ,P_LANGUAGE_ID);
    V_STRING := RTRIM(REPORTS_LIBRARY.BUILD_LOCALIZATION_STRING(P_REPORT_GID
    ,P_LANGUAGE_ID));
    /*SRW.APPLY_DEFINITION*/NULL;
    IF P_KEEP_FILE_FLAG = 'Y' THEN
    WS_DATE := '_' || TO_CHAR(SYSDATE
    ,'YYMMDDHHMI');
    END IF;
    P_FILE := LOWER(TRANSLATE(TRANSLATE(P_DOMAIN || '_' || P_REPORT_GID
    ,'_') || P_RPT_JOB || WS_DATE || '.' || DESFORMAT);
    DESNAME := LOWER(P_REPORTS_OUT_DIR || '/' || P_FILE);
    /*SRW.GET_REPORT_NAME(P_REPORT_PHYSICAL_NAME)*/NULL;
    P_REPORT_PHYSICAL_NAME := RTRIM(P_REPORT_PHYSICAL_NAME);
    P_PDF_HYPERLINK := P_REPORT_CALL || '?' || P_REP_USERID || ' server=' || P_REPORTS_SERVER || ' report=' || P_REPORT_PHYSICAL_NAME || ' destype=CACHE desformat=PDF p_gl_user=' || P_GL_USER || ' p_within_report=Y' || ' P_REPORT_GID=' || P_REPORT_GID || ' p_l_time_period=' || ' p_l_named_range=' || ' p_rep_userid=' || P_REP_USERID;
    P_XML_HYPERLINK := P_REPORT_CALL || '?' || P_REP_USERID || ' server=' || P_REPORTS_SERVER || ' report=' || P_REPORT_PHYSICAL_NAME || ' destype=CACHE desformat=XML p_gl_user=' || P_GL_USER || ' p_within_report=Y' || ' P_REPORT_GID=' || P_REPORT_GID || ' p_l_time_period=' || ' p_l_named_range=' ||' p_rep_userid=' || P_REP_USERID;
    SET_LEXICAL_PARAMETERS;
    RETURN (TRUE);
    END AFTERPFORM;
    FUNCTION P_SHIP_END_RANGEVALIDTRIGGER RETURN BOOLEAN IS
    BEGIN
    RETURN (TRUE);
    END P_SHIP_END_RANGEVALIDTRIGGER;
    FUNCTION VALUE_ENTERED(LEX_NAME IN VARCHAR2) RETURN BOOLEAN IS
    BEGIN
    IF LEX_NAME > ' ' AND LEX_NAME <> '1=1' AND LEX_NAME IS NOT NULL THEN
    RETURN (TRUE);
    ELSE
    RETURN (FALSE);
    END IF;
    END VALUE_ENTERED;
    PROCEDURE SET_LEXICAL_PARAMETERS IS
    PLS_ORIG_P1 VARCHAR2(32766);
    BEGIN
    P_L_SHIPMENT_GGID := REPLACE(P_L_SHIPMENT_GGID
    ,'~'
    IF VALUE_ENTERED(P_L_SHIPMENT_GGID) THEN
    P_L_SHIPMENT_GGID := 'WHERE SH.P_L_SHIPMENT_GGID ' || REPORTS_LIBRARY.GET_FILTER_CONDITION(P_L_SHIPMENT_GGID,NULL,'Y');
    ELSE
    P_L_SHIPMENT_GGID := '1=1';
    END IF;
    END SET_LEXICAL_PARAMETERS;
    END PRI_SEC_OCEAN_FCL_BOOKING_VIEW;
    Thanks,
    Dev

    Hi Dev,
    I am not aware that you could change the value of P_L_SHIPMENT_GGID this way.
    One quick way to test that will be to set it to default to something like 'where 1=2' in your concurrent program and see if it runs but produce no results.
    If it indeed does run, then it confirms my thinking.
    You can then do something like this;
    Try creating a global variable in your pri_sec_ocean_fcl_booking_view package header, say G_L_SHIPMENT_GGID.
    Calculate your lexical string and put it in G_L_SHIPMENT_GGID.
    Reference G_L_SHIPMENT_GGID in your query
    FROM SHIPMENT_INVOLVED_PARTY SH,
    CONTACT CT
    &G_L_SHIPMENT_GGID
    .......Kofi

  • SQL Insert Error - Please help. RESOLVED

    I have a page with several VOs and search options. One of the search options is a list of Emp IDs which (when one is selected and user clicks 'search') results in an editable table of profiles for that Emp Id.
    I have in the Footer of the results table an input field and a button 'add' bound to a method that takes two params and inserts a 'new' profile for the searched Emp Id and the value entered in the input field.
    When I enter a value and click 'add' I get the following:
    JBO-29000: Unexpected exception caught: oracle.jbo.DMLConstraintException, msg=JBO-26048: Constraint "BADGE_ACCESS_EMP_FK" violated during post operation:"Insert" using SQL Statement "BEGIN INSERT INTO BADGE_ACCESS(EMPLOYEE_ID,BADGE,ROW_ID) VALUES (?,?,?) RETURNING ROW_ID INTO ?; END;".
    JBO-26048: Constraint "BADGE_ACCESS_EMP_FK" violated during post operation:"Insert" using SQL Statement "BEGIN INSERT INTO BADGE_ACCESS(EMPLOYEE_ID,BADGE,ROW_ID) VALUES (?,?,?) RETURNING ROW_ID INTO ?; END;".
    ORA-02291: integrity constraint (HR.BADGE_ACCESS_EMP_FK) violated - parent key not found ORA-06512: at line 1
    My Emp table is simple - just an ID, First and Last names with ID as PK. My profile table (called Badge_Access) has the EmpId as FK and it's own PK set by a DBSequence. The other column in Badge_Access is for the input value (number).
    I do not know how to debug in JDeveloper such that I can see the values that are being passed to the method. My 'add' button method is:
    public void createBadgeAccess(Number empId, Number badge) {
    BadgeAccessImpl ba = (BadgeAccessImpl)getDBTransaction().createEntityInstance(BadgeAccessImpl.getDefinitionObject(), null);
    ba.setEmployeeId(empId);
    ba.setBadge(badge);
    getDBTransaction().commit();
    I have the 'value' of the empId param = ${bindings.AccessByEmployeeEmployeeId.inputValue}
    This is the selectOneChoice field the user uses to search...
    and the 'value' of the badge param = ${bindings.Badge.inputValue}
    This is the input field the user fills in before clicking 'add'...
    The values I think I am passing are empId=106 and badge=102 - both are valid & the 'parent key' 106 is valid...
    any help will be greatly appreciated!!! Thanks
    Ginni
    Message was edited by:
    ginnim
    I found a Tip that described what was happening.

    Wrap some try/catch around the statements instead of trying to decipher the Java junk. Could be a problem in the PS, could be a number of things. At least figure where in the application the error takes place.

  • Convert to multi-org 11.5.10.2-db is 10.2.0.4 - Giving errors Please help

    like bunch of errors.
    When I goto system admin->profile-->system-->find MO: %
    list of values gives errors.
    sqlplus -s APPS/***** @/erpmnt/D1ERP/d1erpappl/ad/11.5.0/admin/sql/adorgcnv.pls 'CONVERT' 'AP_1096_DATA_ALL' '1000' '1' '1'
    declare
    ERROR at line 1:
    ORA-20000: ORA-20001: Cannot read site level profile value for profile 'ORG_ID'
    Cursor SQL statement:
    SQL statement:
    ORA-06512: at line 463
    Time when worker started job: Tue Aug 03 2010 20:04:19
    Start time for file is: Tue Aug 03 2010 20:04:19
    sqlplus -s APPS/***** @/erpmnt/D1ERP/d1erpappl/ad/11.5.0/admin/sql/adorgcnv.pls 'CONVERT' 'AP_AWT_TAX_RATES_ALL' '1000' '1' '1'
    declare
    ERROR at line 1:
    ORA-20000: ORA-20001: Cannot read site level profile value for profile 'ORG_ID'
    Cursor SQL statement:
    SQL statement:
    ORA-06512: at line 463
    Time when worker failed: Tue Aug 03 2010 20:04:19
    Evaluating symbolic arguments ....
    Done evaluating symbolic arguments.
    Time when worker started job: Tue Aug 03 2010 20:04:19
    Start time for file is: Tue Aug 03 2010 20:04:19
    sqlplus -s APPS/***** @/erpmnt/D1ERP/d1erpappl/ad/11.5.0/admin/sql/adorgcnv.pls 'CONVERT' 'AP_BANK_ACCOUNTS_ALL' '1000' '1' '1'
    declare
    ERROR at line 1:
    ORA-20000: ORA-20001: Cannot read site level profile value for profile 'ORG_ID'
    Cursor SQL statement:
    SQL statement:
    ORA-06512: at line 463
    Time when worker failed: Tue Aug 03 2010 20:04:20
    Evaluating symbolic arguments ....
    Done evaluating symbolic arguments.
    Time when worker started job: Tue Aug 03 2010 20:04:20
    Start time for file is: Tue Aug 03 2010 20:04:20
    sqlplus -s APPS/***** @/erpmnt/D1ERP/d1erpappl/ad/11.5.0/admin/sql/adorgcnv.pls 'CONVERT' 'AP_BATCHES_ALL' '1000' '1' '1'
    declare
    ERROR at line 1:
    ORA-20000: ORA-20001: Cannot read site level profile value for profile 'ORG_ID'
    Cursor SQL statement:
    SQL statement:
    ORA-06512: at line 463
    Time when worker failed: Tue Aug 03 2010 20:04:20
    Evaluating symbolic arguments ....
    Done evaluating symbolic arguments.
    Time when worker started job: Tue Aug 03 2010 20:04:21
    Start time for file is: Tue Aug 03 2010 20:04:21
    sqlplus -s APPS/***** @/erpmnt/D1ERP/d1erpappl/ad/11.5.0/admin/sql/adorgcnv.pls 'CONVERT' 'AP_CARD_CODE_SETS_ALL' '1000' '1' '1'
    declare
    ERROR at line 1:
    ORA-20000: ORA-20001: Cannot read site level profile value for profile 'ORG_ID'
    Cursor SQL statement:
    SQL statement:
    ORA-06512: at line 463
    Time when worker failed: Tue Aug 03 2010 20:04:21
    Evaluating symbolic arguments ....
    Done evaluating symbolic arguments.
    Time when worker started job: Tue Aug 03 2010 20:04:21
    Start time for file is: Tue Aug 03 2010 20:04:21
    sqlplus -s APPS/***** @/erpmnt/D1ERP/d1erpappl/ad/11.5.0/admin/sql/adorgcnv.pls 'CONVERT' 'AP_CARD_GL_ACCTS_ALL' '1000' '1' '1'
    declare
    ERROR at line 1:
    ORA-20000: ORA-20001: Cannot read site level profile value for profile 'ORG_ID'
    Cursor SQL statement:
    SQL statement:
    ORA-06512: at line 463
    Time when worker failed: Tue Aug 03 2010 20:04:21
    Evaluating symbolic arguments ....
    Done evaluating symbolic arguments.
    Time when worker started job: Tue Aug 03 2010 20:04:21
    Start time for file is: Tue Aug 03 2010 20:04:21
    sqlplus -s APPS/***** @/erpmnt/D1ERP/d1erpappl/ad/11.5.0/admin/sql/adorgcnv.pls 'CONVERT' 'AP_CARD_PROFILES_ALL' '1000' '1' '1'
    declare
    ERROR at line 1:
    ORA-20000: ORA-20001: Cannot read site level profile value for profile 'ORG_ID'
    Cursor SQL statement:
    SQL statement:
    ORA-06512: at line 463
    Time when worker failed: Tue Aug 03 2010 20:04:22
    Evaluating symbolic arguments ....
    Done evaluating symbolic arguments.
    Time when worker started job: Tue Aug 03 2010 20:04:22
    Start time for file is: Tue Aug 03 2010 20:04:22
    sqlplus -s APPS/***** @/erpmnt/D1ERP/d1erpappl/ad/11.5.0/admin/sql/adorgcnv.pls 'CONVERT' 'AP_CARD_PROGRAMS_ALL' '1000' '1' '1'
    declare
    ERROR at line 1:
    ORA-20000: ORA-20001: Cannot read site level profile value for profile 'ORG_ID'
    Cursor SQL statement:
    SQL statement:
    ORA-06512: at line 463
    Time when worker failed: Tue Aug 03 2010 20:04:22
    Evaluating symbolic arguments ....
    Done evaluating symbolic arguments.
    Time when worker started job: Tue Aug 03 2010 20:04:23
    Start time for file is: Tue Aug 03 2010 20:04:23
    sqlplus -s APPS/***** @/erpmnt/D1ERP/d1erpappl/ad/11.5.0/admin/sql/adorgcnv.pls 'CONVERT' 'AP_CARD_SUPPLIERS_ALL' '1000' '1' '1'
    declare
    ERROR at line 1:
    ORA-20000: ORA-20001: Cannot read site level profile value for profile 'ORG_ID'
    Cursor SQL statement:
    SQL statement:
    ORA-06512: at line 463
    Time when worker failed: Tue Aug 03 2010 20:04:23
    Evaluating symbolic arguments ....
    Done evaluating symbolic arguments.
    Time when worker started job: Tue Aug 03 2010 20:04:23
    Start time for file is: Tue Aug 03 2010 20:04:23
    sqlplus -s APPS/***** @/erpmnt/D1ERP/d1erpappl/ad/11.5.0/admin/sql/adorgcnv.pls 'CONVERT' 'AP_CHECKRUN_CONC_PROCESSES_ALL' '1000' '1' '1'
    declare
    ERROR at line 1:
    ORA-20000: ORA-20001: Cannot read site level profile value for profile 'ORG_ID'
    Cursor SQL statement:
    SQL statement:
    ORA-06512: at line 463
    Time when worker failed: Tue Aug 03 2010 20:04:23
    Evaluating symbolic arguments ....

    Hi,
    Please see (Note: 183066.1 - Adadmin - Convert to Multi-Org Fails on Adworker).
    Thanks,
    Hussein

  • SQL SCRIPT ERROR PLEASE HELP!!!

    DROP TABLE CUSTOMERUSER CASCADE CONSTRAINTS;
    CREATE TABLE CUSTOMERUSER
    ( Username VARCHAR(10) NOT NULL,
    UserID VARCHAR(15) NOT NULL,
    Pword VARCHAR(30),
    Street VARCHAR(15),
    City VARCHAR(15),
    Postalcode VARCHAR(15),
    Phone VARCHAR(10),
    Email VARCHAR(16),
    PRIMARY KEY (Username,UserID));
    DROP TABLE ADMINISTRATOR CASCADE CONSTRAINTS;
    CREATE TABLE ADMINISTRATOR
    ( Username VARCHAR(10) NOT NULL,
    EmployeeID VARCHAR(15) NOT NULL,
    Pword VARCHAR(30),
    AdminType VARCHAR(15),
    PRIMARY KEY (Username,EmployeeID));
    DROP TABLE FLIGHT CASCADE CONSTRAINTS;
    CREATE TABLE FLIGHT
    ( FlightID VARCHAR(10) NOT NULL,
    FlightNumber VARCHAR(15) NOT NULL,
    Airline VARCHAR(30),
    AvailableSeats INT,
    PRIMARY KEY (FlightID));
    DROP TABLE RESERVATION CASCADE CONSTRAINTS;
    CREATE TABLE RESERVATION
    ( ReservationNumber VARCHAR(10) NOT NULL,
    IsPaid VARCHAR(4) NOT NULL,
    dayof VARCHAR(10),
    FlightID VARCHAR(10) NOT NULL,
    UserID VARCHAR(15) NOT NULL,
    PRIMARY KEY (ReservationNumber,UserID),FOREIGN KEY (FlightID) REFERENCES FLIGHT(FlightID),FOREIGN KEY (UserID) REFERENCES customeruser(UserID));
    DROP TABLE PAYMENT CASCADE CONSTRAINTS;
    CREATE TABLE PAYMENT
    ( PaymentID VARCHAR(10) NOT NULL,
    PaymentAmount VARCHAR(15) ,
    PaymentDate VARCHAR(30),
    ReservationNumber INT NOT NULL,
    PRIMARY KEY (PaymentID),FOREIGN KEY (ReservationNumber) REFERENCES RESERVATION(ReservationNumber));
    DROP TABLE FLIGHTSCHEDULE CASCADE CONSTRAINTS;
    CREATE TABLE FLIGHTSCHEDULE
    ( FlightNumber VARCHAR (15) NOT NULL,
    Fromw VARCHAR(25) ,
    Wto VARCHAR(25),
    DepatureDate VARCHAR(10) ,
    ArrivalDate VARCHAR(10),
    Class VARCHAR(10) ,
    DepatureTime VARCHAR(8),
    ArrivalTime VARCHAR (8) NOT NULL,
    PRIMARY KEY (FlightNumber),FOREIGN KEY (FlightNumber) REFERENCES FLIGHT(FlightNumber));
    When i execute the RESERVATION section. it gaving me a error called " *
    ERROR at line 7:
    ORA-02270: no matching unique or primary key for this column-list
    How to fix that?

    in TABLE RESERVATION the FOREIGN KEY (UserID) REFERENCES customeruser(UserID) expects the primary key of TABLE CUSTOMERUSER to be UserID (not PRIMARY KEY (Username,UserID) as in your case) or the TABLE CUSTOMERUSER having an unique index on UserID.
    Regards
    Etbin
    Edited by: Etbin on 3.12.2011 22:22
    You might be sorry defining DepartureDate as VARCHAR2(10) and DepartureTime as VARCHAR2(8) instead of Departure DATE (time component included)
    the same for ArrivalDate in TABLE FLIGHTSCHEDULE
    in TABLE RESERVATION there is dayof VARCHAR(10) too

  • Windows - No Disk Error - Please help!

    Windows - No Disk Error - Please help!
    Hi,
    I have the following set up:
    * Lenovo T-61p
    * Windows XP Pro, SP 3
    * HP Photosmart 8250 printer (with nothing plugged into the various card readers, and USB slot in the printer)
    I am getting the following error:
    Windows - No Disk
    Exception Processing Message 0xc0000013 Parameters 0x75CE023C
    0x84C40C84 0x75CE023C
    I have done a lof experimenting and thru process of  elimination, and believe I have determined that this only happens when the HP Photosmart 8250 printer is plugged in to the USB slot of the computer.
    I can stop it from happening by safely removing hardware, and removing the drive that the 8250 creates on your computer when you plug it in.  In my case, this is drive E.  I'm guessing if there was something in the the various card readers, and USB slot in the printer, that's what those would be, but I don't those use those functions of the printer.
    I understand there is more at work than simply the printer, because I did not used to get this error, so some software changed as well, that is scanning all ports, and finding a drive that has no disk, and producing the error.
    A simple google search finds a lot people all over the world having this problem, and are solving it in different ways, because the suspected source is different: Norton, HP, etc.
    I have tried everything I have read, and the only thing that works was my own idea, of manually safely removing the drive the printer creates each time I plug in the printer.
    Anyone every any better, more permanent solutions?  Or know what the real root of the problem is?  What is scanning all the drives and being showing an error message because it found an empty drive?
    Thanks and Happy Holidays/New Year!

    I've been getting the same error on my 4G nano for the past week. I've had my nano for about a month and the first few weeks were fine. Tried it on 2 different computers (Vista and XP) and same problem. Tried it on a 3rd (XP) and it started ok. Problem started coming back after a day.
    I was able to find a quick fix though. I noticed that sometimes the message says something like "iexplore.exe... no disk..." even if I don't even use IE. What I do is end iexplore.exe on task manager before running iTunes and syncing my nano. I don't get the error whenever I do this, but one drawback is that the contents of my nano suddenly pops up in a window - even when disk use is not enabled.
    I've reset/restored my nano dozens and dozens of times to make sure it's clean. Leads me to believe it's a driver issue. Either that or I have a friggin malware problem I can't seem to find.
    I'll be posting updates every now and then. I'm no expert so I'm hoping an Apple expert also steps in to give some input.

  • My ipod generation 5 will not come out of recovery mode. i was simply updating my software and this happened. it will not let me restore it comes up with and error. please help, thanks.

    my ipod generation 5 will not come out of recovery mode. i was simply updating my software and this happened. it will not let me restore it comes up with and error. please help, thanks.

    Hey erinoneill24,
    Thanks for using Apple Support Communities.
    Sounds like you can't update your device. You don't mention an error that it gives you. Take a look at both of these articles to troubleshoot.
    iPod displays "Use iTunes to restore" message
    http://support.apple.com/kb/ts1441?viewlocale=it_it
    If you can't update or restore your iOS device
    http://support.apple.com/kb/HT1808?viewlocale=de_DE_1
    If you started your device in recovery mode by mistake, restart it to exit recovery mode. Or you can just wait—after 15 minutes the device will exit recovery mode by itself.
    Have a nice day,
    Mario

  • I cannot use iCloud on Windows 7, as it won't recognize my apple ID when i try to sign in to icloud it i get error saying "you can't sign in because of a server error (please help some one)

    I cannot use iCloud on Windows 7, as it won't recognize my apple ID when i try to sign in to icloud it i get error saying "you can't sign in because of a server error (please help some one)

    Although your message isn't mentioned in the symptoms, let's try the following document with that one:
    Apple software on Windows: May see performance issues and blank iTunes Store

  • HT201442 I did this but still i am getting the same error , please help me .

    I did this but still i am getting the same error , please help me .
    <Email Edited by Host>

    Look at http://support.apple.com/kb/ts4451
     Cheers, Tom

  • I am not able to update my iphone 4 ,when ever i tried to update it its show 1309 error...and at times 9006 error ,please help me ..

    i am not able to update my iphone 4 ,when ever i tried to update it its show 1309 error...and at times 9006 error ,please help me ..

    Hey alkarim2008,
    If you are having an issue with being unable to update or restore your iPhone, I would suggest that you troubleshoot using the steps in this article - 
    Resolve iOS update and restore errors in iTunes - Apple Support
    Thanks for using Apple Support Communities.
    Happy computing,
    Brett L 

  • My iphone won't pass the connect to itunes. when i try to restore is says that there is an error. please help!

    hi my iphone is broken. it won't pass the connect to itunes. when i try to restore is says that there is an error. please help!
    thanks,
    jg2013
    <Subject Edited by Host>

    Hello, 02633. 
    Thank you for visiting Apple Support Communities. 
    If your iPhone is disabled, you will need to process the steps in the article below.
    iOS: Forgotten passcode or device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    Cheers,
    Jason H.

  • HT4623 I have updated my iphone with the current software but it is showing you need to connect to  of itunes to activate your phone, when i did that it is continuously showing an error.please help me to get through.

    I have updated my iphone with the current software but it is showing you need to connect to  of itunes to activate your phone, when i did that it is continuously showing an error.please help me to get through.
    Kindly Activate my phone.

    Rajan Gupta wrote:
    ...it is continuously showing an error.
    See here  >  http://support.apple.com/kb/TS3424
    Also see this discussion.
    https://discussions.apple.com/message/21189708

  • I need the drivers for earl 2011 macbook pro 13 inch i7 4 gigs for windows 7 64 bits i tried downloading with bootcamp butt it never completes allways ends up with an error please help

    i need the drivers for earl 2011 macbook pro 13 inch i7 4 gigs for windows 7 64 bits i tried downloading with bootcamp butt it never completes allways ends up with an error please help if any one has the drivers or knows were i can download them

    Doug...
    If you don't have it for reference, the manual might come in handy > US/Boot_Camp_Install-Setup.pdf
    After it loads, Command + F to find information regarding the drivers.

  • HT201210 hi i just bought my new iPhone 4s yesterday and when u opened it was not updated so when i tried SO MANY TIMES to update it on the devise and on my new mac it said that there was a unknown error please help me :)

    hi i just bought my new iPhone 4s yesterday and when u opened it was not updated so when i tried SO MANY TIMES to update it on the devise and on my new mac it said that there was a unknown error please help me

    Please tell us what kind of computer you have, what operating system and what version of iTunes. Not just "the latest version of iTunes", the exact version number.

  • I can't download the apple ios 5 for the ipad. after downloading around 10 % an error no. 3259 occurs. it's a network error. please help . it's urgent. i am having apple ipad 2 3G wifi

    i can't download the apple ios 5 for the ipad. after downloading around 10 % an error no. 3259 occurs. it's a network error. please help . it's urgent. i am having apple ipad 2 3G wifi.

    i switched off all the security settings and all the firewalls.
    i m unable to install any of the app on the ipad
    so i saw the apple support and it said to update the older version of my ipad.
    and niether am i able to download the update nor am i able to download any app and install it in my ipad2
    i also tried to download an .ipsw file (ios5 update) from torrentz bt i am also unable to install from that as itunes rjects that file and gives an error. and also tries to delete that file. plz anyone help urgently.

Maybe you are looking for

  • QuickTime fails to export

    For some reason, my system suddenly stopped exporting from QuickTime. I first noticed it last night when I was rendering something from After Effects using the Photo-JPEG codec. It didn't work. Then I tried exporting an animation-compressed movie to

  • Content Holder in Muse

    I am attempting to use a content holder in Muse so an area of content can be shared across the Desktop and Mobile version. Under Settings, I changed the setting so Muse Editing is off. That way i see the Content Holders show on the admin menu on left

  • textarea text lost in ITS when using carriage return

    If the user hits carriage return in a <textarea>, i.e. to create a new line of text, everything after the carriage return is ignored by R/3 when retrieving the text. Is there a way to avoid this loss of text. Thanks Karen

  • EDIINT AS2 Adapter in SAP XI

    Dear experts, I need to install an EDIINT AS2 adapter into my SAP XI. Have anybody can provide me the steps how to do this? Where can I get/download the AS2 adapter? Best regards,

  • Power cord replacement for HP Deskjet F4480. Can I buy it from HP?

    I lost the power adaptor and power cord for HP Deskjet F4480. Can I buy it from HP?