Getting ORA-00903:invalid table name with both system and table owner

Hi All,
Oracle version 9.2
I'm trying to retrieve some information from a few tables and import them to Excel. I haven't got much idea about ORACLE, but I'm not able to do anything.
I open SQL PLus, and use CONNECT SYSTEM/[email protected] AS SYSDBA
The console shows connected.
I use select table_name,owner from dba_tables where owner='USER1';
I can see the tables I want to access in the output.
I do select * from USER1.TABLE1 and also tried with select * from TABLE1, both return ORA-00903:invalid table
I also tried to connect with "CONNECT USER1/[email protected]" also shows connected, but then same error ORA-00903:invalid table
Could anyone guide me so I can find out whats going on wrong??
Thanks.. Best regards!

Great! this worked! At least now I know I can read the data.
Now I would like to get the data from this table into Excel 2007, but I can't install Office in the ORACLE server, so I have setup my client computer (Windows 2003 server with Excel 2007).
I installed the ORACLE ODBC driver, and put the TNSName.ora file into the network admin folder.
I successfully create the ODBC connector, and try connection is successfull. However, when I try to get the data, Excel send an error saying that it cannot list the tables!
Anyway, any simple solution will do. If there is an easy way of making ORACLE create for example a CSV file with all the data from the table it will be good as well. What would be the easiest way?

Similar Messages

  • How do I get iPhoto to publish an album with both pics and movies in it?

    The built-in link to iWeb seems to assume either:
    (a) I have lots of pictures, but no movies, or
    (b) I have ONE movie, and no pictures.
    This is kinda frustrating.
    I expected there to be some easy, clever, way to one-click publish an album with a mix of pics and movies.
    Is there a check-box someplace I don't know about? Or a HowTo?
    Thanks in advance!
    MacBook Pro Intel core 2 Duo, 2.33 Ghz, 2M RAM 200G HD   Mac OS X (10.4.8)   Parallels with XP Pro (ugh)

    Hi bdm105!
    Most likely, this is happening because the Album Artist field is different for each song from Random Access Memories. We have an article about song grouping in iTunes, and it can be found here:
    Why aren't songs with the same album art grouped together?
    http://support.apple.com/kb/ts1468
    There are a couple ways to fix the information listed for Random Access Memories outlined in that article, but I want to point out one here:
    Albums in which all songs don't have the same Album Artist information
    iTunes 7 and later includes a new attribute for song files called Album Artist This allows you to assign a primary artist name for an album that many includes songs by several artists. It is important that all songs in the album have the same Album Artist name. To assign an Album Artist, select all the songs in the album and choose Get Infofrom the File menu. Next, type a name in the Album Artist field name such that it will apply to all the selected songs. This field can optionally be left blank if all the songs have the same album name.
    The Album Artist field is shown in the above picture, but it is not highlighted. You will also want to make sure the Track Number field contains the correct information for the album, and information on that field can be found here:
    Fixing Incorrect Song or Album Listings in iTunes
    http://support.apple.com/kb/ta24677
    Thanks for being a part of the Apple Support Communities!
    Regards,
    Braden

  • "ORA-00903: invalid table name" when enqueue using a CLOB in an ADT payload

    I am attempting to enqueue into an AQ that has an ADT with a CLOB field in it. If I leave the CLOB empty, it works. As soon as I place content in it, I get the error below in the BPEL log.
    I actually get the same problem when I run the "AQ_ADT_with_CLOB_Payload" example. Please help!
    Error in the BPEL log:
    <2005-11-08 09:22:07,784> <ERROR> <default.collaxa.cube.ws> <AQ Adapter::Outbound> MessageWriter_enqueue: Could not enqueue message due to database error
    <2005-11-08 09:22:07,784> <ERROR> <default.collaxa.cube.ws> <AQ Adapter::Outbound>
    java.sql.SQLException: ORA-00903: invalid table name
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:137)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:304)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:271)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:625)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181)
    at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:661)
    at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:951)
    at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:693)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1057)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2901)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2942)
    at oracle.tip.adapter.aq.database.MessageWriter.doEnqueue(MessageWriter.java:530)
    at oracle.tip.adapter.aq.database.MessageWriter.enqueue(MessageWriter.java:341)
    at oracle.tip.adapter.aq.database.MessageWriter.writeMessage(MessageWriter.java:303)
    at oracle.tip.adapter.aq.outbound.AQEnqueuer.execute(AQEnqueuer.java:108)
    at oracle.tip.adapter.aq.AQInteraction.executeRunTime(AQInteraction.java:194)
    at oracle.tip.adapter.aq.AQInteraction.execute(AQInteraction.java:180)
    at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:469)
    at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeInputOnlyOperation(WSIFOperation_JCA.java:652)
    at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:441)
    at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInvocationManager.java:310)
    at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:184)
    at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__invoke(BPELInvokeWMP.java:601)
    at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:316)
    at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:185)
    at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3398)
    at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1905)
    at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:100)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:185)
    at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5410)
    at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1300)
    at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:509)
    at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:307)
    at ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.handleInvoke(ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.java:1796)
    at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:37)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:76)
    at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
    at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
    at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
    at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:748)
    at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:921)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
    at java.lang.Thread.run(Thread.java:534)

    OK, I figured it out myself. :)
    Turns out when I define the queue name in the AQ Adapter definition, I was specifying "<Default Schema>" as the schema name. When I changed this to my actual schema name (eg: "SCOTT"), it worked. Nice little bug there!
    The reason it broke with the example program is because I was changing the schema name before I deployed it. As I didn't have a SCOTT schema.
    So the moral of the story here is, don't use "<Default Schema>"!
    I was running on 10.1.2.0.0 [build #1787 ]. In case anyone wants to fix this.

  • SQL Statement error - ORA-00903: invalid table name

    Hi
    I have written a sql script that gets executed from a form within e-business suite. Unfortunately, the script is falling over with an error:
    unknown command beginning "MERGE INTO..." - rest of line ignored.
    unknown command beginning "USING edop..." - rest of line ignored.
    unknown command beginning "ON (elw.ro..." - rest of line ignored.
    unknown command beginning "WHEN MATCH..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
          SET ELW.billed_flag          = t.billed_flag,
    ERROR at line 2:
    ORA-00903: invalid table name the actual statement that is causing the issue is:
    MERGE INTO edopaif.table1 elw
    USING edopaif.tablw2 t
    ON (elw.rowid = t.LOAD_WORKING_ROWID)
    WHEN MATCHED THEN
       UPDATE
          SET ELW.billed_flag          = t.billed_flag,
              ELW.last_bill_generated   = t.last_bill_generated,
              ELW.last_bill_type        = t.last_bill_type,
              ELW.load_month            = t.load_month,
              ELW.BILL_TRANSACTION_ID   = t.bill_transaction_id
    WHEN NOT MATCHED THEN
       INSERT(error_meaning)
       VALUES('ROWID error with ins_ptia');The version of e-business suite that we are using is: 11.5.10.2.
    The version of the Oracle database that we are using is:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    PL/SQL Release 9.2.0.6.0 - Production
    CORE 9.2.0.6.0 Production
    TNS for IBM/AIX RISC System/6000: Version 9.2.0.6.0 - Production
    NLSRTL Version 9.2.0.6.0 - Production
    Please note that I am able to successfully run the statement directly connected as the APPS schema in the database - the error only occurs when the script is run from the forms front-end (which is really confusing me).
    Many thanks
    Paul

    Hi
    I've modified the script to include only the statement that is erroring and it still errors when executed from the front end application.
    Next I re-wrote the statement to use PL/SQL instead of the MERGE statement, to do the update, and the script completes succesfully, i.e.:
    DECLARE
       CURSOR cu_lw IS
             SELECT t.billed_flag,
                    t.last_bill_generated,
                    t.last_bill_type,
                    t.load_month,
                    t.bill_transaction_id,
                    t.load_working_rowid
               FROM table2 t;
    BEGIN
       FOR rec_cu_lw IN cu_lw LOOP
          UPDATE table1 elw
             SET ELW.billed_flag           = rec_cu_lw.billed_flag,
              ELW.last_bill_generated      = rec_cu_lw.last_bill_generated,
              ELW.last_bill_type           = rec_cu_lw.last_bill_type,
              ELW.load_month               = rec_cu_lw.load_month,
              ELW.BILL_TRANSACTION_ID      = rec_cu_lw.bill_transaction_id
          WHERE elw.rowid                  = rec_cu_lw.load_working_rowid;
       END LOOP;
    END;
    /I am still unsure as to why the MERGE statement is failing when executed in the front end, but completes in the backend with no issues at all. Obviously I would prefer to use the MERGE statement instead of PL/SQL to do the update.
    Thanks
    Paul

  • ORA-00903: Invalid table name - running Set based mapping

    Hello,
    Using OWB 10.2.04.36 and have created a mapping which reads data from Non-Oracle, ODBC source table, actually a worksheet in an Excel workbook which has been defined/set up using the Heterogeneous Service components.
    I can view the data in the worksheet using the Design Center, Data Object Editor, Data Viewer tab so I know the data is accessible.
    The mapping is performing a Loading Type: INSERT/UPDATE into a View which has an INSTEAD OF INSERT OR UPDATE OR DELETE ON view.
    The mapping validates okay and is deployed successfully.
    Yet when it is run in "Set based" Operating Mode from Control Center Manager the Execution Results show an "ORA-00903: Invalid table name" error is raised.
    You cannot run the mapping in any Row based operating mode as Row based running fails with "ORA:22816: Unsupported feature with RETURNING clause" due to the generated code for the INSERT/UPDATE of the view using a RETURNING clause which is actioned on an INSTEAD OF trigger.
    Looking at the generated package code I can strip out the SELECT statement from the MERGE statement for the alias "MERGE_SUBQUERY" and it runs and displays the expected result, however when the complete MERGE statement is taken and run I get the same ORA-00903 error that was reported in Control Center Manager.
    Any ideas what the problem could be? I have another mapping that reads from the same source Excel workbook/worksheet and INSERT/UPDATE into a table without an INSTEAD OF trigger, this mapping deploys, runs successfully so the issue seems to be with the INSERT/UPDATE into the view. The views are what we require to be populated.
    Thanks.

    Hi,
    But changing V_EMP_DEPT to EMP is not INSERTING/UPDATING to the view V_EMP_DEPT, what you propose is INSERTING/UPDATING into the table EMP. The code was only an example showing that the MERGE does not work when INSERTING/UPDATING into a view based on joining tables. For example say you wanted to INSERT/UPDATE the DNAME of V_EMP_DEPT then the MERGE statement generated by OWB PL/SQL mapping would use the code structure/template:-
    MERGE INTO "V_EMP_DEPT" "V_EMP_DEPT"
       USING (SELECT 5369 "EMPNO",
                     'SMITH' "ENAME",
                     'CLERK' "JOB",
                     7902 "MGR",
                     To_Date('17/12/1980','DD/MM/YYYY') "HIREDATE",
                     800 "SAL",
                     'New Dept Name" "DNAME"
              FROM   Dual,
                     "DEPT" "DEPT"
              WHERE  ("DEPT"."DEPTNO" = 20)) "MERGE_SUBQUERY"
       ON (    "V_EMP_DEPT"."EMPNO" = "MERGE_SUBQUERY"."EMPNO")
       WHEN NOT MATCHED THEN
          INSERT("V_EMP_DEPT"."EMPNO",
                 "V_EMP_DEPT"."ENAME",
                 "V_EMP_DEPT"."JOB",
                 "V_EMP_DEPT"."MGR",
                 "V_EMP_DEPT"."HIREDATE",
                 "V_EMP_DEPT"."SAL",
                 "V_EMP_DEPT"."DNAME")
          VALUES("MERGE_SUBQUERY"."EMPNO",
                 "MERGE_SUBQUERY"."ENAME",
                 "MERGE_SUBQUERY"."JOB",
                 "MERGE_SUBQUERY"."MGR",
                 "MERGE_SUBQUERY"."HIREDATE",
                 "MERGE_SUBQUERY"."SAL",
                 "MERGE_SUBQUERY"."DNAME")
       WHEN MATCHED THEN
          UPDATE
             SET "ENAME" = "MERGE_SUBQUERY"."ENAME",
                 "JOB" = "MERGE_SUBQUERY"."JOB",
                 "MGR" = "MERGE_SUBQUERY"."MGR",
                 "HIREDATE" = "MERGE_SUBQUERY"."HIREDATE",
                 "SAL" = "MERGE_SUBQUERY"."SAL",
                 "DNAME" = "MERGE_SUBQUERY"."DNAME";
    {code}
    This was only an example my target view has a lot more columns being MERGE'd into the view and joined tables.
    Cheers,
    Phil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Reconciliation error: ORA-00903: invalid table name

    I am facing this error, below:
    SELECT * FROM WHERE ORC_KEY = ? AND UD_RES_P_KEY = ?: java.sql.SQLSyntaxErrorException: ORA-00903: invalid table name
    Is it a product issue from OIM 9.1.0.2?
    best regards,
    Robert

    No, it is not a product issue. Please go to the process definition tab related and
    set all Multivalued attribute as a key field in Reconciliation mapping in Process definition.
    Let me know the result, please.
    hope this helps,
    Thiago L Guimaraes

  • ORA-00903:invalide table name

    Hi,
    I can not understand. I'm loged into DB as sysdba :
    select table_name, owner from all_tables where table_name ='ORDER';
    TABLE_NAME                     OWNER
    ORDER                          SYS
    select * from ORDER
    error on line 1 :
    ORA-00903:invalide table name
    select * from SYS.ORDER
    error on line 1 :
    ORA-00903:invalide table nameThank for help.

    user522961 wrote:
    thank you.
    But why that ? I have always used table name without double qutation mark ?
    Regards.
    Edited by: user522961 on May 29, 2009 2:53 AMThink about this variant on your query:
    select * from order
    order by 1;What do you suppose oracle is doing when it parses your query and it sees "order" where it is expecting a table name?

  • Invalid table name when pass in the table name as variable in dynamic sql

    Hi,
    I need to create a stored procedure which will return a list of data to my java application like the following.
    first, select the table name from the first table.
    For example : SELECT T_NAME FROM MDR_SMSTABLES
    second, select the data from the table which returned by first select statement
    For example : SELECT * FROM T_NAME.
    I use dynamic sql with cursor to select the data. But it returns "java.sql.SQLException: ORA-00903: invalid table name"
    I fetch the table name to varchar2. I think this might the cause it returns me the this error. But i don't know what type should i put for the table name other then varchar2.
    val2 VARCHAR2(200);
    OPEN cv FOR
    SELECT T_NAME FROM MDR_SMSTABLES WHERE T_DATE=d_dt_sent;
    FETCH cv INTO val2;
    WHILE cv%FOUND
    LOOP
    OPEN refcur FOR
    'SELECT * FROM :t WHERE MID = :m' USING val2, msg_id;
    EXIT WHEN refcur IS NOT NULL;
    FETCH cv INTO val2;
    END LOOP;
    As my stored procedure is quite long, so i just paste some of the code here. Hope the information is enough. Can anyone please help?
    Thanks

    DECLARE
    val2 VARCHAR2 (200);
    cv sys_refcursor;
    refcur sys_refcursor;
    BEGIN
    OPEN cv FOR
    SELECT table_name
    FROM user_tables
    WHERE table_name IN ('EMP', 'DEPT');
    FETCH cv INTO val2;
    WHILE cv%FOUND
    LOOP
    OPEN refcur FOR 'SELECT * FROM '||val2;
    EXIT WHEN refcur IS NOT NULL;
    FETCH cv INTO val2;
    END LOOP;
    END;

  • Failure Description: ORA-44002: invalid object name

    Hi,
    I'm trying to use O-cluster to find clusters in my data programmatically. When I try to bin the data (using a modified version of the dmocdemo.java), I get the following error
    Failure Description: ORA-44002: invalid object name
    Details -
    I'm trying to cluster data in my table (see desc below) based on values of evt_hostname, evt_key and evt_username;
    SQL> desc sc.sc_event_store;
    Name Null? Type
    EVT_SEQNO NOT NULL VARCHAR2(64)
    EVT_HOSTNAME NOT NULL VARCHAR2(64)
    EVT_TIMESTAMP NOT NULL TIMESTAMP(6)
    EVT_ID NOT NULL NUMBER(8,2)
    EVT_CAT_ID NUMBER(8,2)
    EVT_SERVERSTATE NUMBER(8,2)
    EVT_USERNAME VARCHAR2(64)
    EVT_KEY VARCHAR2(2048)
    EVT_VALUE VARCHAR2(64)
    EVT_RECUR_TAG NUMBER(15,2)
    EVT_CLUSTER_ID VARCHAR2(64)
    I've modified prepareData() in dmocdemo.java like this
    isOutputAsView = false;
    inputDataURI = "SC.SC_EVENT_STORE";
    outputDataURI = "OC_BINNED_DATA_BUILD_JDM";
    // Create boundaries for all numeric attributes
    OraBinningTransformImpl buildDataXform =
    (OraBinningTransformImpl)m_binningXformFactory.create(
    inputDataURI, outputDataURI, isOutputAsView );
    //buildDataXform.setLiteralFlag(true);
    String[] excludeColumnList = {"EVT_SEQNO","EVT_TIMESTAMP","EVT_ID","EVT_CAT_ID","EVT_SERVERSTATE","EVT_VALUE","EVT_RECUR_TAG","EVT_CLUSTER_ID"};
    buildDataXform.setExcludeColumnList(excludeColumnList);
    buildDataXform.setNumberOfBinsForCategorical(125);
    //buildDataXform.setNumericalBinningType(OraNumericalBinningType.auto_equi_width);
    buildDataXform.setCategoricalBinningType(OraCategoricalBinningType.systemDefault);
    xformTask = m_xformTaskFactory.create(buildDataXform);
    executeTask(xformTask, "ocPrepareBuildTask_jdm");
    The executeTask() function tries executing the task, but returns with
    Failure Description: ORA-44002: invalid object name
    Any insight/help will be greatly appreciated.

    Arthur suggestion works but you shouldnt even be doing this on a SQL Task.
    Use a data flow task. You'll have better control over the data that is being transfered and get better performance because no staging table will be used.
    Just because there are clouds in the sky it doesn't mean it isn't blue. But someone will come and argue that in addition to clouds, birds, airplanes, pollution, sunsets, daltonism and nuclear bombs, all adding different colours to the sky, this
    is an undocumented behavior and should not be relied upon.

  • ORA-00904: invalid column name - trying to sum

    Hi all
    probably somrthing really stupid and easy that I'm missing but here goes
    I am trying to gather data from 3 tables, 1st one is stock master file - all records are unique key
    2nd table is barcodes, product key can occur 2 / 3 times - one for each barcode that is assigned to a product.
    3rd table is warehouse stock, again key can occur a few times as there is a key for each stock record
    I need to pull the data from 1st two tables and sum the total of warehouse stock for each record pulled.
    I know I will get 2 or 3 records for each stock item as each record will return with a different barcode. what I'm trying to eliminate is returning the same records again with a separate row for each set of warehouse stock records.
    If I run
    select rmdept||','||rmstyl||','||rmcolr||','||rmsize||','||rmvatc||','||rmshgp||','||
    rmdesc||','||rmacod||','||rmcdes||','||rmzdes||','||rmsupp||','||rmsspr||','||
    rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||rdcstk
    from (select unique a.rmdept,a.rmstyl,a.rmcolr,a.rmsize,a.rmvatc,a.rmshgp,
    a.rmdesc,a.rmacod,a.rmcdes,a.rmzdes,a.rmsupp,a.rmsspr,a.rmlcos,c.rsbarc,a.rmpord,a.rmmrch,
    a.rmcomq, b.rdcstk
    from stkmas a, stkwar b, stkbar c
    where a.rmdept = c.rsdept(+) and a.rmstyl = c.rsstyl(+) and a.rmcolr = c.rscolr(+)
    and a.rmsize = c.rssize(+) and a.rmdept = b.rddept(+) and a.rmstyl = b.rdstyl(+)
    and a.rmcolr = b.rdcolr(+)
    and a.rmsize = b.rdsize(+)
    group by rmdept, rmstyl, rmcolr, rmsize, rmvatc, rmshgp,
    rmdesc, rmacod, rmcdes, rmzdes, rmsupp, rmsspr, rmlcos, rsbarc, rmpord,
    rmmrch, rmcomq, rdcstk)
    order by rmdept, rmstyl, rmcolr
    I get all the data I want, but duplicate rows for every stock record
    53117701612,1,705,ECKO LOGO STEE W,,X*BRT.ROSE,WMN 12,G12,25,6.44,,0,LT,539,1
    53117701612,1,705,ECKO LOGO STEE W,,X*BRT.ROSE,WMN 12,G12,25,6.44,,0,LT,539,228
    the last column is the stock record
    I would like to return just one row showing warehouse stock as 229
    If I run
    select rmdept||rmstyl||rmcolr||rmsize||','||rmvatc||','||rmshgp||','||
    rmdesc||','||rmacod||','||rmcdes||','||rmzdes||','||rmsupp||','||rmsspr||','||
    rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||sum(rdcstk)
    from (select unique a.rmdept,a.rmstyl,a.rmcolr,a.rmsize,a.rmvatc,a.rmshgp,
    a.rmdesc,a.rmacod,a.rmcdes,a.rmzdes,a.rmsupp,a.rmsspr,a.rmlcos,c.rsbarc,a.rmpord,a.rmmrch,a.rmcomq, b.rdcstk
    from stkmas a, stkwar b, stkbar c
    where a.rmdept = c.rsdept(+) and a.rmstyl = c.rsstyl(+) and a.rmcolr = c.rscolr(+)
    and a.rmsize = c.rssize(+) and a.rmdept = b.rddept(+) and a.rmstyl = b.rdstyl(+)
    and a.rmcolr = b.rdcolr(+)
    and a.rmsize = b.rdsize(+))
    group by rmdept, rmstyl, rmcolr, rmsize, rmvatc, rmshgp,
    rmdesc, rmacod, rmcdes, rmzdes, rmsupp, rmsspr, rmlcos, rsbarc, rmpord,
    rmmrch, rmcomq, rdcstk
    order by rmdept, rmstyl, rmcolr
    sum on rdcstk in first select statement, I still get two records returned
    00101401409,1,001,NKE ULTRACELL M,,B/W/R CL44,SIZE 9,N01,5,15.24,0010140194095,0,FW,-1,-1
    00101401409,1,001,NKE ULTRACELL M,,B/W/R CL44,SIZE 9,N01,5,15.24,0010140194095,0,FW,-1,0
    If I change sum to 2nd select statement and leave the group by statement outside the brackets
    select rmdept||rmstyl||rmcolr||rmsize||','||rmvatc||','||rmshgp||','||
    rmdesc||','||rmacod||','||rmcdes||','||rmzdes||','||rmsupp||','||rmsspr||','||
    rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||rdcstk
    from (select unique a.rmdept,a.rmstyl,a.rmcolr,a.rmsize,a.rmvatc,a.rmshgp,
    a.rmdesc,a.rmacod,a.rmcdes,a.rmzdes,a.rmsupp,a.rmsspr,a.rmlcos,c.rsbarc,a.rmpord,a.rmmrch,a.rmcomq, sum(b.rdcstk)
    from stkmas a, stkwar b, stkbar c
    where a.rmdept = c.rsdept(+) and a.rmstyl = c.rsstyl(+) and a.rmcolr = c.rscolr(+)
    and a.rmsize = c.rssize(+) and a.rmdept = b.rddept(+) and a.rmstyl = b.rdstyl(+)
    and a.rmcolr = b.rdcolr(+)
    and a.rmsize = b.rdsize(+))
    group by rmdept, rmstyl, rmcolr, rmsize, rmvatc, rmshgp,
    rmdesc, rmacod, rmcdes, rmzdes, rmsupp, rmsspr, rmlcos, rsbarc, rmpord,
    rmmrch, rmcomq, rdcstk
    order by rmdept, rmstyl, rmcolr
    I get
    rmmrch, rmcomq, rdcstk
    ERROR at line 14:
    ORA-00904: invalid column name
    If I put the group by inside the brackets
    select rmdept||rmstyl||rmcolr||rmsize||','||rmvatc||','||rmshgp||','||
    rmdesc||','||rmacod||','||rmcdes||','||rmzdes||','||rmsupp||','||rmsspr||','||
    rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||rdcstk
    from (select unique a.rmdept,a.rmstyl,a.rmcolr,a.rmsize,a.rmvatc,a.rmshgp,
    a.rmdesc,a.rmacod,a.rmcdes,a.rmzdes,a.rmsupp,a.rmsspr,a.rmlcos,c.rsbarc,a.rmpord,a.rmmrch,
    a.rmcomq, sum(b.rdcstk)
    from stkmas a, stkwar b, stkbar c
    where a.rmdept = c.rsdept(+) and a.rmstyl = c.rsstyl(+) and a.rmcolr = c.rscolr(+)
    and a.rmsize = c.rssize(+) and a.rmdept = b.rddept(+) and a.rmstyl = b.rdstyl(+)
    and a.rmcolr = b.rdcolr(+)
    and a.rmsize = b.rdsize(+)
    group by rmdept, rmstyl, rmcolr, rmsize, rmvatc, rmshgp,
    rmdesc, rmacod, rmcdes, rmzdes, rmsupp, rmsspr, rmlcos, rsbarc, rmpord,
    rmmrch, rmcomq, rdcstk)
    order by rmdept, rmstyl, rmcolr
    I get
    rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||rdcstk
    ERROR at line 3:
    ORA-00904: invalid column name
    I get the same even if I change the field names in the group by to a.rmdept etc.
    rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||rdcstk
    ERROR at line 3:
    ORA-00904: invalid column name
    any help, hints or tips greatly appreciated. this is an 8.1.7 database
    Thanks
    Janet

    Thanks dnikiforov
    still get the
    select a.rmdept||a.rmstyl||a.rmcolr||a.rmsize||','||a.rmvatc||','||a.rmshgp||','||rmdesc||','||rmac
    ERROR at line 1:
    ORA-00904: invalid column name
    I think its a problem with trying to select on the unique, anyway I accidentally posted a couple of threads for this and it has now been resolved by
    select a.rmdept||a.rmstyl||a.rmcolr||a.rmsize||','||a.rmvatc||','||a.rmshgp||','||
    a.rmdesc||',||a.rmacod||','||a.rmcdes||','||a.rmzdes||','||a.rmsupp||','||a.rmsspr||','||a.rmlcos||','||
    c.rsbarc||','||a.rmpord||','||a.rmmrch||','||a.rmcomq||','||sum(b.rdcstk)
    from stkmas a, stkwar b, stkbar c
    where a.rmdept = c.rsdept(+)
    and a.rmstyl = c.rsstyl(+)
    and a.rmcolr = c.rscolr(+)
    and a.rmsize = c.rssize(+)
    and a.rmdept = b.rddept(+)
    and a.rmstyl = b.rdstyl(+)
    and a.rmcolr = b.rdcolr(+)
    and a.rmsize = b.rdsize(+)
    group by a.rmdept,a.rmstyl,a.rmcolr,a.rmsize,a.rmvatc,a.rmshgp,
    a.rmdesc,a.rmacod,a.rmcdes,a.rmzdes,a.rmsupp,a.rmsspr, a.rmlcos,
    c.rsbarc,a.rmpord,a.rmmrch,a.rmcomq
    as I dont need to use the unique because the sum does it for me
    Thanks again for speedy help

  • I am getting "ORA-00900: invalid SQL statement"  error.?

    I did installed oracle 11gR2. and used "DBMS_METADATA_DIFF.COMPARE_ALTER('TABLE','TBL_A','TBL_A','USER1','USER2')"   to see the result like below,  but I am getting "ORA-00900: invalid SQL statement"  error.   Any idea?
    I am using:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL> desc user1.tbl_a
    Name                                      Null?    Type
    FIELD_A1                                  NOT NULL NUMBER
    FIELD_A2                                           VARCHAR2(20)
    FIELD_A4                                  NOT NULL NUMBER(5,2)
    FIELD_A5                                           VARCHAR2(10)
    FIELD_A6                                  NOT NULL NUMBER(2)
    SQL> desc user2.tbl_a
    Name                                      Null?    Type
    FIELD_A1                                  NOT NULL NUMBER
    FIELD_A2                                           VARCHAR2(50)
    FIELD_A3                                           DATE
    FIELD_A4                                           NUMBER(5,2)
    FIELD_A5                                  NOT NULL VARCHAR2(10)
    SQL> select dbms_metadata_diff.compare_alter('TABLE','TBL_A','TBL_A','USER1','USER2') from dual
    expected result:
    DBMS_METADATA_DIFF.COMPARE_ALTER('TABLE','TBL_A','TBL_A','U1','U2')
    ALTER TABLE "U1"."TBL_A" ADD ("FIELD_A3" DATE)
      ALTER TABLE "U1"."TBL_A" DROP ("FIELD_A6")
      ALTER TABLE "U1"."TBL_A" MODIFY ("FIELD_A2" VARCHAR2(50))
      ALTER TABLE "U1"."TBL_A" MODIFY ("FIELD_A4" NUMBER(5,2) DEFAULT 0)
      ALTER TABLE "U1"."TBL_A" MODIFY ("FIELD_A4" NULL)
      ALTER TABLE "U1"."TBL_A" MODIFY ("FIELD_A5" NOT NULL ENABLE)

    Thanks for reply rp,
    I got result using "select dbms_metadata_diff.compare_alter('TABLE','TBL_A','TBL_A','USER1','USER2') from dual"

  • Invalid column name (with ojdbc)

    hi,
    I created a resultSet by executing query with more then one table in it. (left join)
    and now i want to getObject. so I execute resultSet.getObject("tablename.columnName")
    and I get this error "invalid column name".
    when i'm doing the same thing with MySQL it works fine.
    I don't want to do aliases for all the columns because there are too much of those.
    please help.
    thanks,
    asaf.

    that's not standard JDBC. You must use either the plain column name,
    or the column number. In cases where there are multiple columns with
    the same name you must use the column number for all but the first
    column with the same name.
    Joe Weinstein

  • When Import get Error-00904 Invalid Column Name

    Hi all,
    I'm using DI Premium 3.0 with Oracle 10.2.0.1.0 repository. I'm trying to connect Oracle 8.1.4.7.1 (8i) but when i going to import tables get Error-00904 Invalid Column Name. If i connect to Oracle 10.2.0.4.0 don't get error.
    Trying from DI XI R2 (11.7) with Oracle 10.2.0.2.0 repository, to connect Oracle 8.1.4.7.1 (8i) don´t get error!
    Is error from Oracle repository version?
    Thanks in advance.
    Jorge

    Hi Manoj,
    This is the output:
    SQL> desc all_tab_columns
    Name                                      Null?    Type
    OWNER                                      NOT NULL      VARCHAR2(30)
    TABLE_NAME                             NOT NULL      VARCHAR2(30)
    COLUMN_NAME                          NOT NULL      VARCHAR2(30)
    DATA_TYPE                                           VARCHAR2(106)
    DATA_TYPE_MOD                                           VARCHAR2(3)
    DATA_TYPE_OWNER                                         VARCHAR2(30)
    DATA_LENGTH                           NOT NULL      NUMBER
    DATA_PRECISION                                          NUMBER
    DATA_SCALE                                                   NUMBER
    NULLABLE                                                     VARCHAR2(1)
    COLUMN_ID                                 NOT NULL      NUMBER
    DEFAULT_LENGTH                                          NUMBER
    DATA_DEFAULT                                            LONG
    NUM_DISTINCT                                                 NUMBER
    LOW_VALUE                                                    RAW(32)
    HIGH_VALUE                                                   RAW(32)
    DENSITY                                                      NUMBER
    NUM_NULLS                                                    NUMBER
    NUM_BUCKETS                                             NUMBER
    LAST_ANALYZED                                           DATE
    SAMPLE_SIZE                                                  NUMBER
    CHARACTER_SET_NAME                                    VARCHAR2(44)
    CHAR_COL_DECL_LENGTH                                 NUMBER
    GLOBAL_STATS                                            VARCHAR2(3)
    USER_STATS                                                   VARCHAR2(3)
    AVG_COL_LEN                                             NUMBER
    Thanks for your help.
    Jorge

  • Lightroom 4 crashes when trying to open the slideshow module. I spent over three hours with both Adobe and Apple tech support and we know it is a permission issue but have not been able to get it solved.  It started with the last upgrade to 10.8

    Lightroom 4 crashes when trying to open the slideshow module. I spent over three hours with both Adobe and Apple tech support and we know it is a permission issue but have not been able to get it solved.  It started with the last upgrade to 10.8

    Back up all data.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. To do that, unlock the preference pane using the credentials of an administrator, check the box marked Allow user to administer this computer, then reboot. You can demote the problem account back to standard status when this step has been completed.
    Triple-click the following line to select it. Copy the selected text to the Clipboard (command-C):
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -Rh $UID:staff ~ $_ ; sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2> /dev/null
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
    Step 2 (optional)
    The first step should give you usable permissions in your home folder. This step will restore special attributes set by OS X on some user folders to protect them from unintended deletion or renaming. You can skip this step if you don't consider that protection to be necessary.
    Boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    resetpassword
    That's one word, all lower case, with no spaces. Then press return. A Reset Password window will open. You’re not  going to reset a password.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • ORA-00904: invalid column name in select query by using abstract datatype

    Hi,
    I had created abstract datatype as PERSON_TY and ADDRESS_TY ,
    after inserting the record . i'm tryng to select the column but i got the error , even i refferd all those thing. they are given that same please look this finde me a result.
    SQL> DESC PERSON_TY
    Name Null? Type
    NAME VARCHAR2(25)
    ADDRESS ADDRESS_TY
    SQL> DESC ADDRESS_TY
    Name Null? Type
    STREET VARCHAR2(30)
    CITY VARCHAR2(25)
    STATE CHAR(2)
    COUNTRY VARCHAR2(15)
    SQL> SELECT * FROM EMPLOYE
    2 ;
    EMP_CODE
    PERSON(NAME, ADDRESS(STREET, CITY, STATE, COUNTRY))
    10
    PERSON_TY('VENKAT', ADDRESS_TY('112: BLUE MOUNT', 'CHENNAI', 'TN', 'INDIA'))
    20
    PERSON_TY('SRINI', ADDRESS_TY('144: GREEN GARDEN', 'THAMBARAM', 'TN', 'INDIA'))
    SQL> SELECT PERSON.NAME FROM EMPLOYE
    2 ;
    SELECT PERSON.NAME FROM EMPLOYE
    ERROR at line 1:
    ORA-00904: invalid column name
    regards
    venki

    SELECT PERSON.NAME FROM EMPLOYEIf you look in the documentation, you will see that we need to alias the table in order to make this work:
    select e.person.name from employees e
    /Cheers, APC
    Blog : http://radiofreetooting.blogspot.com

Maybe you are looking for

  • Best practice to integrate the external(ERP or Database etc) eCommerce data in to CQ

    Hi Guys, I am refering to GEOMetrixx-Outdoors project for building eCommerce fucntionality in our project. Currently we are integrating with an ERP system to fetch the Product details. Now I need to store all the Product data from ERP system in to ou

  • Oracle XSQL Servlet Parse Error when anchoring a link to an image

    I have a database of document links that I wish to portray in a table as graphic images. In other words, each image is a hypertext link to the document. From my HTML 101 I used to do this as follows: <IMG SRC="image.gif"> Note, no </IMG> end tag, but

  • Windows installer missing??? Satellit A505-S6960

    Have had the computer since late August.  Used constantly.  Yesterday when I turn it on it gave me an error message loading the webcam as well as my malware sweep program.    says itunes is not installed correctly.   Also can't access microsoft word

  • Merge JPEG and RAW after import from iPhoto

    Hi, camera is set to shoot JPEG + RAW, iPhoto manages after import from camera as two separate files. I want to transition from iPhoto to Aperture. After importing from iPhoto into Aperture, is there any chance to merge the files in a way similar to

  • F-32 posting

    Hi I need to call f-32 immediately after releasing the billing document in vf02 .  And user allow to change f-32 items manually if required.  Please guide me for this. Thanks