Getting ORA-00904 from various SPARQL statements

Hi,
I am currently working on a couple of Java services which offer access to semantic information using Jena. I have implemented two possible adapters so far, one "feeds" from an owl-file directly, one from an Oracle 11g (semantic technologies).
In both cases, I use SPARQL SELECT and CONSTRUCT statements for my queries. Querying the owl-file-based adapter with these statements, everything works fine. querying the Oracle adapter, I often get the following stacktrace:
Caused by: java.sql.SQLException: ORA-00904: "TYPE": ungültiger Bezeichner
     at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74)
     at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131)
     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:204)
     at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
     at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
     at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
     at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
     at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
     at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
     at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
     at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
     at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
     at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1203)
     at oracle.spatial.rdf.client.jena.Oracle.executeQuery(Oracle.java:352)
     at oracle.spatial.rdf.client.jena.Oracle.executeQuery(Oracle.java:315)
     at oracle.spatial.rdf.client.jena.OracleSemQueryPlan.executeBindings(OracleSemQueryPlan.java:431)
     ... 65 more
The SELECT statement used is:
==============
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?type ?label ?comment
WHERE { <http://www.demo-uri.com/test.owl#demoInstance> rdf:type ?type .
OPTIONAL { <http://www.demo-uri.com/test.owl#demoInstance> rdfs:label ?label .
FILTER(langMatches(lang(?label),'de') || (!langMatches(lang(?label),'*'))) . }
OPTIONAL { <http://www.demo-uri.com/test.owl#demoInstance> rdfs:comment ?comment .
FILTER(langMatches(lang(?comment),'de') || (!langMatches(lang(?comment),'*'))) }
==============
The generated SELECT clause is:
SELECT type$RDFVTYP, type$RDFLTYP, type$RDFLANG, type$RDFCLOB, decode(type$RDFVTYP, 'BLN', ('_:'||substr(type,instr(type,'m',4)+1)), type) type
FROM table(sdo_rdf_match('(<http://www.demo-uri.com/test.owl#demoInstance> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?type) ', sdo_rdf_models('DEMO_MODEL'), sdo_rdf_rulebases('OWLPRIME'), null, null, NULL,' '))
I am really grateful for any advise! A simple statement like
[...]WHERE { <http://www.demo-uri.com/test.owl#demoInstance> rdf:type ?type }
works fine.
Best,
Damian

Thanks for the reply.
I have changed the statement according to your advice:
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?typ ?lbl ?cmnt
WHERE { <http://www.demo-uri.com/test.owl#demoInstance> rdf:type ?typ .
OPTIONAL { <http://www.demo-uri.com/test.owl#demoInstance> rdfs:label ?lbl .
FILTER(langMatches(lang(?lbl),"de") || (!langMatches(lang(?lbl),"*"))) . }
OPTIONAL { <http://www.demo-uri.com/test.owl#demoInstance> rdfs:comment ?cmnt .
FILTER(langMatches(lang(?cmnt),"de") || (!langMatches(lang(?cmnt),"*"))) }}
but still the same stacktrace :(
Caused by: java.sql.SQLException: ORA-00904: "TYP": ungültiger Bezeichner
     at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74)
     at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131)
     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:204)
     at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
     at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
     at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
     at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
     at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
     at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
     at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
     at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
     at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
     at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1203)
     at oracle.spatial.rdf.client.jena.Oracle.executeQuery(Oracle.java:352)
     at oracle.spatial.rdf.client.jena.Oracle.executeQuery(Oracle.java:315)
     at oracle.spatial.rdf.client.jena.OracleSemQueryPlan.executeBindings(OracleSemQueryPlan.java:431)
     ... 65 more
Edited by: user13170651 on 22.09.2010 02:32

Similar Messages

  • Materialized view problem ORA-00904: "from$_subquery$_ error

    Hello everyone,
    I've created data warehouse star schema and I'm trying to set up materialized view. DBMS_MVIEW.EXPLAIN_MVIEW passes and also the select query passes and is executed with no problems but when I try to CREATE MATERIALIZED VIEW... then error ORA-00904: "from$_subquery$_003"."SERVICE_ID_2_2": invalid identifier pops-up. How does Oracle 9i (9.2.0.1.0) managed to do this ? How to make it to work ?
    This is the query, and the schema:
    CREATE MATERIALIZED VIEW analiza_profitabilnosti
    BUILD IMMEDIATE
    REFRESH FAST
    ON COMMIT
    AS
    select
    GROUPING_ID(t.y,t.q,t.m,t.w,t.d,s.service_type,s.service_id,c.customer_category) as g_id,
    t.y, t.q, t.m, t.w, t.d,
    s.service_type , s.service_id ,
    c.customer_category ,
    COUNT(*) as c_star,
    SUM(cost) cost, COUNT(cost) c_cost,
    SUM(number_of_units) number_of_units, COUNT(number_of_units) as c_number_of_units
    from fact f
    inner join timeline t on f.datum = t.datum
    inner join service s on f.service_id = s.service_id
    inner join customer_category c on f.customer_category=c.customer_category
    group by
    ROLLUP(t.y, t.q, t.m, t.w, t.d),
    ROLLUP(s.service_type, s.service_id),
    ROLLUP (c.customer_category)
    and the schema:
    FACT (
    DATUM DATE,
    HOST_ID NUMBER,
    SERVICE_ID NUMBER (5),
    CALLED_PREFIX_ID NUMBER (10),
    CUSTOMER_CATEGORY NUMBER,
    TRAFIC_PERIOD_ID NUMBER (5),
    CALL_DURATION NUMBER,
    COST NUMBER,
    NUMBER_OF_UNITS NUMBER,
    NUMBER_OF_CALLS NUMBER)
    TIMELINE (
    Y VARCHAR2 (5),
    Q VARCHAR2 (5),
    M VARCHAR2 (5),
    W VARCHAR2 (5),
    D VARCHAR2 (5),
    DATUM DATE NOT NULL)
    SERVICE (
    SERVICE_ID NUMBER (5) NOT NULL,
    SERVICE_CODE VARCHAR2 (15) NOT NULL,
    SERVICE_NAME VARCHAR2 (63),
    SERVICE_TYPE NUMBER (5),
    SERVICE_TYPE_CODE VARCHAR2 (4) NOT NULL,
    S_ID NUMBER (5))
    CUSTOMER_CATEGORY (
    CUSTOMER_CATEGORY_NAME VARCHAR2 (65) NOT NULL,
    CUSTOMER_CATEGORY NUMBER NOT NULL)
    Thanks,
    Igor

    Yes, thank you. I suspected that version is problem, and patch 9.2.0.6 helped. It works under 9.2.0.6

  • Update statement getting ORA-00904 invalid identifier

    I am getting this ORA error when I try to conduct an update statement from a column value in one table to a like-named column in another table.
    For instance, in my select, shown below, this query runs like a champ, returning all of my records
    SELECT
    b.ID,
    b.ZIP, a.ZIP,
    a.NAME,
    a.LOCATION
    FROM TBL_ARCHIVE a
    INNER JOIN TBL_UAT b ON
    a.ID = b.ID
    WHERE
    b.ID > 470000  And b.ID <470100;However, if I try to run an update statement with any of the following, I get this error. It seems so strange to me that I'd get an error using the same columns in the update statement, but would return the desired results effectively from the select statement!
    one version of UPDATE
    UPDATE TBL_ARCHIVE a
    SET a.ZIP = TBL_UAT.ZIP
    WHERE TBL_UAT.ID = a.ID;and another
    UPDATE TBL_ARCHIVE
    SET a.ZIP  =
    (SELECT b.ZIP
    FROM TBL_UAT b
    WHERE b.ID <472500 And b.ID >471000)
    FROM TBL_ARCHIVE a
    WHERE a.ID = b.ID)
    WHERE ID IN
    (SELECT ID
    FROM TBL_UAT b
    WHERE b.ID  <472500 And b.ID >471000
    );^ - this one produces a SQL not properly ended. Error ORA-00933: SQL command not properly ended.
    I'm really unsure though, how what I thought was a fairly basic update statement wouldn't work. I'm using Oracle 11g but through either Toad or SQL Plus. I've gotten these same errors in both.
    Though MS Access runs slow as snails, I can manage to run the update statement successfully with it, a thousand records or so at a time. Problem is, I've got about 300K records needing updating.
    I've looked around for similar problems but haven't found one where someone wasn't either using a reserved word for a column, which I'm not, I don't believe, or a problem that really dealt with this error in the context of an update statement.
    But I'd welcome any enlightenment on this.

    rp0428 wrote:
    UPDATE TBL_ARCHIVE a
    SET a.ZIP = TBL_UAT.ZIP
    WHERE TBL_UAT.ID = a.ID;That isn't a valid query and neither is the other one.
    Please post the actual query you are using and the actual complete error message you are getting (everything about the error that is displayed).^^
    That is NOT a valid query?
    How else would you have an UPDATE statement created to set the value of a column in table A to the value of a (in this case, same named) column in table B?
    And keep them in order to update the records appropriately?
    I'll append the create statements momentarily.
    Thanks!
    CREATE TABLE TBL_UAT
    ( ID NUMBER(6),
    ZIP VARCHAR2(10 BYTE) ) and
    CREATE TABLE TBL_ARCHIVE
    ( ID NUMBER(6) NOT NULL, NAME VARCHAR2(50 BYTE),
    EMAIL VARCHAR2(50 BYTE),
    LOCATION VARCHAR2(50 BYTE),
    DEPARTMENT VARCHAR2(50 BYTE),
    PRIORITY VARCHAR2(50 BYTE),
    APPROVING_MGR_NAME VARCHAR2(50 BYTE),
    TYPE1 VARCHAR2(50 BYTE),
    TYPE2 VARCHAR2(50 BYTE),
    CONTACT_NAME VARCHAR2(50 BYTE),
    CONTACT_PHN_NO VARCHAR2(50 BYTE),
    LOAN_NUM VARCHAR2(50 BYTE),
    REF_ID VARCHAR2(50 BYTE),
    BORROWER_NAME VARCHAR2(50 BYTE),
    ADDRESS VARCHAR2(50 BYTE),
    CITY VARCHAR2(50 BYTE),
    ST VARCHAR2(50 BYTE),
    ZIP VARCHAR2(10 BYTE),
    SALE_DATE DATE,
    COMMENTS VARCHAR2(800 BYTE),
    TIME_REQ DATE,
    ACCTLOC VARCHAR2(50 BYTE),
    OTHER_ACCTLOC VARCHAR2(50 BYTE)) Hope this can be of assistance.
    Thanks, folks!
    Edited by: user515689 on Feb 7, 2012 11:59 AM

  • Getting ora:00904 invalid indentifier error while running i query

    Hi,
    I have a remote database and local database both are oracle 10gR2.Now i have written the below mentioned query in my local database and is working fine,but in case remote database it is throughing error ora:00904 invalid indentifier.
    I had export the dump from remote db and import it on my local db and i tried the same and it is working fine on local after that also.
    As i believe that this error usually come for column name not exist or column name or it's length or for any special character in column name of the table.But as i said it is working fine on local db but not in remote db though i am using the same dump for local and remote.
    Though when i am querying the table i can able to fetch data for the any record but when i am using the below mentioned query for the same i am getting the error.As i am doing this to fecth the data for child parent related relationship.
    Can any one suggest is there anything related to configaration or something else.
    Please do let me know if you do want some more information on the query what i am doing inside of it.
    Rgds,
    Anit
    Edited by: Anit A. on Sep 1, 2008 2:32 AM
    Edited by: Anit A. on Sep 1, 2008 2:33 AM

    WITH t
    AS
    SELECT decode(t.spnlevel
    ,3,t.u_quotesdtlid
    ,2,decode((select count(*)
    from u_quotesdtl t2
    where t2.u_quotesdtlid = t.u_quotesdtlid
    and t2.parentspn = (t2.jobgroupid||':'||t2.jobtype)
    ),0,(select t1.u_quotesdtlid
    from u_quotesdtl t1
    where t1.spnitemcode = t.parentspn
    and t1.spnlevel = '3'
    and t1.jobtype = t.jobtype
    and t1.jobgroupid = t.jobgroupid
    and t1.QUOTEID = t.QUOTEID
    ),t.u_quotesdtlid
    ,1,decode((select count(*)
    from u_quotesdtl t2
    where t2.QUOTEID = t.QUOTEID
    and t2.parentspn = (t2.jobgroupid||':'||t2.jobtype)
    ),0,t.u_quotesdtlid,decode((select count(*)
    from u_quotesdtl t3
    where t3.QUOTEID = t.QUOTEID
    and t3.parentspn = (t3.jobgroupid||':'||t3.jobtype)
    and t3.u_quotesdtlid in (select t1.u_quotesdtlid
    from u_quotesdtl t1
    where t1.spnitemcode = t.parentspn
    and t1.spnlevel = '2'
    and t1.jobtype = t.jobtype
    and t1.jobgroupid = t.jobgroupid
    and t1.QUOTEID = t.QUOTEID
    ),0,(select t4.u_quotesdtlid
    from u_quotesdtl t4
    ,(select t1.parentspn
    ,t1.jobtype
    ,t1.jobgroupid
    from u_quotesdtl t1
    where t1.spnitemcode = t.parentspn
    and t1.spnlevel = '2'
    and t1.jobtype = t.jobtype
    and t1.jobgroupid = t.jobgroupid
    and t1.QUOTEID = t.QUOTEID
    ) t5
    where t4.spnitemcode = t5.parentspn
    and t4.spnlevel = '3'
    and t4.jobtype = t5.jobtype
    and t4.jobgroupid = t5.jobgroupid
    and t4.QUOTEID = t.QUOTEID
    (select t1.u_quotesdtlid
    from u_quotesdtl t1
    where t1.spnitemcode = t.parentspn
    and t1.spnlevel = '2'
    and t1.jobtype = t.jobtype
    and t1.jobgroupid = t.jobgroupid
    and t1.QUOTEID = t.QUOTEID
    ,null,t.u_quotesdtlid) as parentquoteid
    ,t.u_quotesdtlid as quotesdtlid
    ,t.spnlevel as spnlevel
    FROM u_quotesdtl t
    WHERE t.QUOTEID ='som key id'
    ORDER BY parentquoteid,t.spnlevel desc
    select * from t;

  • Getting ORA-00904 whle running a procedure!

    hi ,
    the following procedure is meant for getting the details which has name of the user tables alone along with number of columns,but am getting -ERROR IN BLOCK:::ORA-00904: "tablename": invalid identifier.
    DECLARE
    v_cols NUMBER:=0;
    cursor c is SELECT table_name FROM user_tables ORDER BY table_name;
    BEGIN
    FOR rec IN c
    LOOP
    v_cols:=0;
    EXECUTE IMMEDIATE 'select count(COLUMN_NAME) from all_col_comments where TABLE_NAME in ('||rec.table_name||') group by TABLE_NAME' INTO v_num_rows;
    DBMS_OUTPUT.PUT_LINE (RPAD (rec.table_name, 32) || LPAD (v_num_rows, 9));
    END LOOP;
    DBMS_OUTPUT.PUT_LINE ('-------------------End_of_Script-------------------');
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('ERROR IN BLOCK:::'||SQLERRM);
    END;
    if there anything needs to change in procedure ,let me know.

    DECLARE
           v_cols NUMBER:=0;
           cursor c is SELECT table_name FROM user_tables ORDER BY table_name;
    BEGIN
           FOR rec IN c
          LOOP
              v_cols:=0;
          EXECUTE IMMEDIATE 'select count(COLUMN_NAME) from all_col_comments where TABLE_NAME in ('''||rec.table_name||''') group by TABLE_NAME' INTO v_num_rows;      ------> Added '' before and After Table Name to allow Oracle to consider as String
              DBMS_OUTPUT.PUT_LINE (RPAD (rec.table_name, 32) || LPAD (v_num_rows, 9));
          END LOOP;
          DBMS_OUTPUT.PUT_LINE ('-------------------End_of_Script-------------------');
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('ERROR IN BLOCK:::'||SQLERRM);
    END;You can use below version using Parameter Binding (Untested!!!)
    DECLARE
           v_cols NUMBER:=0;
           cursor c is SELECT table_name FROM user_tables ORDER BY table_name;
    BEGIN
           FOR rec IN c
          LOOP
              v_cols:=0;
          EXECUTE IMMEDIATE 'select count(COLUMN_NAME) from all_col_comments where TABLE_NAME in (:1) group by TABLE_NAME' INTO v_num_rows using rec.table_name;
              DBMS_OUTPUT.PUT_LINE (RPAD (rec.table_name, 32) || LPAD (v_num_rows, 9));
          END LOOP;
          DBMS_OUTPUT.PUT_LINE ('-------------------End_of_Script-------------------');
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('ERROR IN BLOCK:::'||SQLERRM);
    END;

  • Nested table update gets ORA-00904 with ExecuteSQL, error-free in TOAD

    I'm trying to run an UPDATE query through the ExecuteSQL method
    of the oraDatabase object. The catch seems to be that this one
    affects a nested table (field to be updated is a table itself).
    This SQL runs perfectly in T.O.A.D. ...
    UPDATE B457.AIRLINE a SET
    a.rental_cust_code=B457.RENTCUSTCODELIST(rentcustcodes
    ('45645'),rentcustcodes('1234'),rentcustcodes('234234')) WHERE
    a.AIRLINE_CODE='RCR'
    ...but, it produces the "SQL execution error, ORA-00904: invalid
    column name" when run using ExecuteSQL.
    Do I need to use a different syntax?

    and the complete example
    SQL> create or replace TYPE t_indirizzo AS OBJECT (
      2  via VARCHAR(45),
      3  numero NUMBER,
      4  cap INTEGER(5),
      5  citta VARCHAR(30),
      6  provincia VARCHAR(30),
      7  regione VARCHAR(30)
      8  );
      9  /
    Type created.
    SQL>
    SQL>
    SQL> create or replace TYPE t_telefono AS OBJECT (
      2  num_tel NUMBER(15)
      3  );
      4  /
    Type created.
    SQL>
    SQL> create or replace TYPE t_listaTelefono AS TABLE OF t_telefono
      2  /
    Type created.
    SQL>
    SQL> create or replace TYPE t_cliente AS OBJECT (
      2  cod_cliente NUMBER(8),
      3  indirizzo t_indirizzo,
      4  email VARCHAR(30),
      5  telefono t_listaTelefono
      6  ) NOT FINAL;
      7  /
    Type created.
    SQL>
    SQL> CREATE TABLE cliente OF t_cliente(
      2  cod_cliente NOT NULL,
      3  indirizzo NOT NULL,
      4  email NOT NULL,
      5  PRIMARY KEY (cod_cliente)
      6  ) nested table telefono store as numTelCli_tab
      7  return as value
      8  /
    Table created.
    SQL>

  • Having issues with a left join, getting ORA-00904 error

    Ok this is something very similar to what I am facing, but dumbed down. None of these columns or tables names exist in real life (Very paranoid company I work for, understandable though) but the fundamental problem I am having is like below.
    Basically I know I could have done something similar to this is MS SQL (Or am I dreaming?). If I am right or wrong I need to know a way around this.
    Obviously if you comment out the "CAL.WEEK_SINCE_2005" and "AND CUST.week_since_2005 = CAL.WEEK_SINCE_2005" it would work. But I really need it to display the date as well. So it can be group'ed by week since 2005.
    I will be joining other statements to this. I am hoping on doing this in one select statement instead of creating multiple tables as I am now. All the other joined tables will follow a VERY similar layout to this. So something like this is need to obtain the look.
    When ran I get the following error.
    I look forward to learning what I did wrong and how I can fix it. :)
    select ORG.ORGANIZATION_NAME,
    CUST.CUST_COUNT,
    CAL.WEEK_SINCE_2005
    FROM organization ORG,
    calendar CAL
    LEFT JOIN (
    SELECT CAP.CURRENT_STORE,
    CALEN.week_since_2005,
    count(CAP.inactive_date) CUST_COUNT
    FROM CUST_AGREE_PAST CAP,
    calendar CALEN
    WHERE CAP.active_date is not null
    and CAP.inactive_code in ('T')
    and CAP.inactive_date between '01-sep-07' and sysdate
    and CAP.INACTIVE_DATE = CALEN.CALENDAR_DATE
    and CAP.RSN_CODE_ID in (select rsn_code_id from reasons where title in ('FAIL', 'NO CALL'))
    GROUP BY CAP.CURRENT_STORE,
    CALEN.week_since_2005) CUST
    ON PO.CURRENT_STORE = ORG.ORGANIZATION_NAME
    AND CUST.week_since_2005 = CAL.WEEK_SINCE_2005

    Just noticed a problem (there might be others):
    FROM organization ORG,
    calendar CAL
    LEFT JOIN (You cannot do that - you are mixing Oracle and ANSI join syntax. You have to do one or the other:
    FROM organization ORG
    JOIN calendar CAL on (ORG.col = CAL.col)
    LEFT JOIN (....)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Getting ora-00904 BLOB_CONTENT invalid identifier. Help please.

    Hi everyone,
    I am trying to upload a .jpg file into a custom table with the follwong code:
    DECLARE
    v_id number;
    v_length number;
    v_name varchar2(4000);
    v_mime varchar2(4000);
    v_blob blob;
    begin
    If (:P_F01 is not null) then
    select ID,mime_type,blob_content
    into v_id,v_mime,v_blob from
    APEX_APPLICATION_FILES where name=:P_F01;
    insert into c_file_hdrs(FILEKEY_FK,MECKEY_FK,NAME,ID,MIME_TYPE,FILESIZE,BLOB_CONTENT)
    values (:P1_FILEKEY,:P1_MECKEY_FK,:P1_F01,v_id,v_mime,null,v_blob);
    delete from APEX_APPLICATION_FILES where name = :P1_F01;
    end if;
    end;
    And I am getting an error BLOB_CONTENT invalid identifer. Can anyone suggest what I am doing wrong.
    My TABLE's COLUMNS are as follows:
    MECKEY_FK not null number;
    FILEKEY_FK not null number;
    NAME varchar2(4000);
    ID number;
    MIME_TYPE not null varchar2(4000);
    BLOB_CONTENT NOT null BLOB;
    FILE_SIZE number;
    Thank you in advance,rgds,Suma.

    Check FILESIZE vs. FILE_SIZE.
    Scott

  • Getting ORA-00904 ERROR

    Hi,
    select statmnnt is giving output but while inserting is failing
    getting B: MGR_NUM invalid identifier
    NSERT INTO assc ( b.assc_nm,
              b.STATUS_DT,
              b.STATUS_ID,
              b.first_nm,
              b.last_nm,
              b.curr_title_nm,
              b.curr_field_sales_ind,
              b.MGR_NM)
              select c.assc_nm,
              c.status_dt,
    decode(c.STATUS,'ACTV',1,'INAC',2),
    c.first_nm,
    c.last_nm,
    c.curr_title_nm,
    'N',
    c.MGR_NM
              from ASSCGENTABLE_NEW c
              where c.flag='I';

    should be...
    INSERT INTO assc (
    assc_nm,
    STATUS_DT,
    STATUS_ID,
    first_nm,
    last_nm,
    curr_title_nm,
    curr_field_sales_ind,
    MGR_NM)
    select c.assc_nm,
    c.status_dt,
    decode(c.STATUS,'ACTV',1,'INAC',2),
    c.first_nm,
    c.last_nm,
    c.curr_title_nm,
    'N',
    c.MGR_NM
    from ASSCGENTABLE_NEW c
    where c.flag='I';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • I am getting browser needs updating from various web sites since getting 10.0 update.sites are taking forever to load.I have to click stop then reload to get them to work.

    I have had web site page loading problems since I started beta Firefox.I took the update from beta 9 to 10.0 and since then I am getting a message from various web sites that my browser needs to be updated for site to work with links to all browser update pages including Firefox.Sony premium services support is one of the pages I got the update needed notice.

    Hi,
    You can try using the [https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher/ User Agent Switcher] and create a generic entry like '''Mozilla/5.0 (Windows NT 6.1; rv:9.0.1) Gecko/20100101 Firefox/9.0.1''' and switch to this on problem sites.
    Useful links:
    [https://support.mozilla.com/en-US/kb/Options%20window All about Tools > Options]
    [http://kb.mozillazine.org/About:config Going beyond Tools > Options - about:config]
    [http://kb.mozillazine.org/About:config_entries about:config Entries]
    [https://support.mozilla.com/en-US/kb/Page%20Info%20window Page Info] Tools (Alt + T) > Page Info, Right-click > View Page Info
    [https://support.mozilla.com/en-US/kb/Keyboard%20shortcuts Keyboard Shortcuts]
    [https://support.mozilla.com/en-US/kb/Viewing%20video%20in%20Firefox%20without%20a%20plugin Viewing Video without Plugins]
    [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder & Files]
    [https://developer.mozilla.org/en/Command_Line_Options#Browser Firefox Commands]
    [https://support.mozilla.com/en-US/kb/Basic%20Troubleshooting Basic Troubleshooting]
    [https://support.mozilla.com/en-US/kb/common-questions-after-upgrading-firefox-36 After Upgrading]
    [https://support.mozilla.com/en-US/kb/Safe%20Mode Safe Mode]
    [http://kb.mozillazine.org/Problematic_extensions Problematic Extensions]
    [https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes Troubleshooting Extensions and Themes]
    [https://support.mozilla.com/en-US/kb/Troubleshooting%20plugins Troubleshooting Plugins]
    [http://kb.mozillazine.org/Testing_plugins Testing Plugins]

  • ORA-00904 and packaged function in report

    Oracle 9.2.0.7
    APEX 2.0
    Is APEX not able to deal with SQL that calls a packaged function?
    I ask because I'm able to execute this query:
    SELECT s.doc_id,
    s.last_name || ', ' || s.first_name full_name,
    s.p_id,
    s.create_date
    , rwa_wfrole.get_role_list(s.proj_id, s.p_id) wfrole_label
    FROM signatures_vw s
    WHERE s.proj_id = 182
    AND s.status = 'APPROVED'
    ORDER BY s.create_date, s.last_name, s.first_name
    in SQL*Plus, but not in the SQL Workshop or in a report region. In the latter case I get "ORA-00904 invalid identifier" for "rwa_wfrole.get_role_list"... which is a packaged function. Actually, to be more precise, it's a package in a remote database. In the APEX instance, I have a synonym pointing to it.
    Thanks for insight.
    -John

    I can't reproduce this in 10g. I did find bug 4177810 (Fixed in 9.2.0.8 Server Patch Set) that looks a bit like this problem.
      Description
        An unexpected ORA-904 can occur for some internally generated SQL
        when the select list contains non-column constants and the select
        appears in the FROM clause. This can occur for SQL produced for
        parallel query or for remote / distributed queries.
        Workaround:
          Rewrite the query to avoid constant expressions in the FROM clause select lists.***************************
    There are also recommendations dating way back that you should include the schema name in the Create Synonym statement.
    Scott

  • Sometimes ORA-00904: invalid column

    Hello,
    Some times when i am running a query I get 'ORA-00904: invalid column name'. Next times i run exactly the same query the query runs well for a few times. And in an unpredictable way, exactly the same query fails again.
    I am using Oracle 8i 8.1.7
    Can someone help me out?

    The error does not occur in just a single query. There are multiple query's in whitch the error sometimes occurs. We have been looking for similarity's in the query's, but we haven't found one so far. It seems to be the error does occur more often in query's wich are using a databaselink.
    The error does also occur in update statements.
    This is an example query:
    SELECT DISTINCT
    zt.rowid,
    zt.id,
    zt.begindatum_tim,
    zt.zorgtraject_id,
    zt.SSPC_ZORGTYPE_ID,
    stp_lees_dbc(zrgt.ID, zrgt.initieel_sspc_id, zt.ID)AS dbc,
    stp_lees_dbc_code(zrgt.ID, zrgt.initieel_sspc_id, zt.ID) AS dbc_code
    FROM
    bav_epd_zorgtrajecten zrgt
    ,bav_epd_ztr_zorgtypen zt
    WHERE
    zrgt.ID = :parzorgtrajectid
    AND zrgt.verwijderd_bln = 'N'
    AND zrgt.ID = zt.zorgtraject_id

  • JDBC Receiver adapter-java.sql.SQLException: ORA-00904: "BATCH_ID": invalid

    Hi
    I am trying insert rows in Oracle database using JDBC receiver adapter setup in PI 7.1. However this receiver adapter is throwing following exception.
    Delivering the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'PRADEEP_OTC_ORDERS' (structure 'statement'): java.sql.SQLException: ORA-00904: "BATCH_ID": invalid identifier .
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:mt_sql_writer xmlns:ns0="http://rdbms_poc">
    <statement>
         <dbtablename action="INSERT">
                <table>PRADEEP_OTC_ORDERS</table>
              <access>
                     <order_id>19126</order_id>
                     <version>1</version>
                     <batch_id>132</batch_id>
                </access>
           </dbtablename>
    </statement>
    </ns0:mt_sql_writer>
    PRADEEP_OTC_ORDERS table has just 3 columns as specified the access segment. However I stil get this ORA-00904 error message.
    Any idea on what could be wrong.?
    Thanks
    -Pradeep

    Hi All,
    Thanks a lot for responding...
    I verified the table structure, table just contains those 3 coulms all varchar type.
    I modified the column name as well, But was still getting ORA-00904. Then I went directly to the the database and executed below insert statement,
    insert into PRADEEP_OTC_ORDERS (mps_order_id, mps_version,mps_batch_id) Values(1,2,3)
    I got exact SQL Error: ORA-00904: "MPS_BATCH_ID": invalid identifier.
    So ISAP JDBC adapter is not enclosing the string values in quotes.
    SAP documentation says it puts quotes for values and treats everything as string(text).
    Anybody has any idea, why JDBC receiver adapter not enclosing the values in quotes?
    Thanks
    -Pradeep

  • ORA-00904 with bitmap indexes

    Hi,
    I'm running the following query:
    SELECT
    FLOW.PRODUCT_CODE,
    FLOW.CUSTOMER_SK,
    FLOW.BRAND_SK,
    26,
    FLOW.MPR_SK
    FROM     
    RSB_FACT_FLOW_SD          FLOW,
    RSB_DIM_FLOW               DIM
    WHERE     
    FLOW.FLOW_SK     = DIM.FLOW_SK
    AND     DIM.FLOW_ID                = 'CFRD'
    AND     FLOW.PRODUCT_CODE          = 'G'
    AND     FLOW.FLOW_DATE                >= '01 JAN 2006'
    AND     FLOW.FLOW_DATE                <= '31 JAN 2006'
    AND     EXISTS
         (     SELECT     1
              FROM     RSB_FACT_FLOW_SD          A,
                   RSB_DIM_FLOW          B
              WHERE     
              A.MPR_SK     = FLOW.MPR_SK
         AND A.RECEIVED_DATE >= FLOW.RECEIVED_DATE
              AND     B.FLOW_SK= A.FLOW_SK
              AND     B.FLOW_ID= 'WAO2'
              AND      A.REASON= '02CRO'
    I get ORA-00904: "FLOW"."RECEIVED_DATE": invalid identifier
    This is the defintion of the table:
    CREATE TABLE RSB_FACT_FLOW_SD
    PRODUCT_CODE CHAR(1) NOT NULL,
    WEEK_END_DATE DATE NOT NULL,
    CUSTOMER_SK NUMBER(10) NOT NULL,
    CUSTOMER_ATTRIBUTE_SK NUMBER(10) NOT NULL,
    MPR_SK NUMBER(10) NOT NULL,
    MPR_PROFILE_SK NUMBER(10) NOT NULL,
    SPECCOND_PROFILE_SK NUMBER(10) NOT NULL,
    BRAND_SK NUMBER(10) NOT NULL,
    FLOW_SK NUMBER(10) NOT NULL,
    FLOW_DATE DATE,
    RECEIVED_DATE DATE,
    VALIDATION_STATUS CHAR(1),
    FLOW_TYPE CHAR(1),
    RECEIVED_FROM_SENT_TO VARCHAR2(4),
    REASON VARCHAR2(255),
    FLOW_SEQUENCE NUMBER,
    CUSTOMER_SEGMENT_SK NUMBER(10),
    BRAND_PARTNER_SK NUMBER
    TABLESPACE DW_DATA
    PCTUSED 90
    PCTFREE 0
    PARALLEL
    LOGGING;
    CREATE BITMAP INDEX RSB_FACT_FLOW_SD_IX01 ON RSB_FACT_FLOW_SD
    (PRODUCT_CODE) TABLESPACE DW_INDEXES PARALLEL PCTFREE 0 NOLOGGING COMPUTE STATISTICS;
    CREATE BITMAP INDEX RSB_FACT_FLOW_SD_IX02 ON RSB_FACT_FLOW_SD
    (WEEK_END_DATE) TABLESPACE DW_INDEXES PARALLEL PCTFREE 0 NOLOGGING COMPUTE STATISTICS;
    CREATE BITMAP INDEX RSB_FACT_FLOW_SD_IX03 ON RSB_FACT_FLOW_SD
    (CUSTOMER_SK) TABLESPACE DW_INDEXES PARALLEL PCTFREE 0 NOLOGGING COMPUTE STATISTICS;
    CREATE BITMAP INDEX RSB_FACT_FLOW_SD_IX04 ON RSB_FACT_FLOW_SD
    (CUSTOMER_ATTRIBUTE_SK) TABLESPACE DW_INDEXES PARALLEL PCTFREE 0 NOLOGGING COMPUTE STATISTICS;
    CREATE BITMAP INDEX RSB_FACT_FLOW_SD_IX05 ON RSB_FACT_FLOW_SD
    (MPR_SK) TABLESPACE DW_INDEXES PARALLEL PCTFREE 0 NOLOGGING COMPUTE STATISTICS;
    CREATE BITMAP INDEX RSB_FACT_FLOW_SD_IX06 ON RSB_FACT_FLOW_SD
    (MPR_PROFILE_SK) TABLESPACE DW_INDEXES PARALLEL PCTFREE 0 NOLOGGING COMPUTE STATISTICS;
    CREATE BITMAP INDEX RSB_FACT_FLOW_SD_IX07 ON RSB_FACT_FLOW_SD
    (SPECCOND_PROFILE_SK) TABLESPACE DW_INDEXES PARALLEL PCTFREE 0 NOLOGGING COMPUTE STATISTICS;
    CREATE BITMAP INDEX RSB_FACT_FLOW_SD_IX08 ON RSB_FACT_FLOW_SD
    (BRAND_SK) TABLESPACE DW_INDEXES PARALLEL PCTFREE 0 NOLOGGING COMPUTE STATISTICS;
    CREATE BITMAP INDEX RSB_FACT_FLOW_SD_IX09 ON RSB_FACT_FLOW_SD
    (FLOW_SK) TABLESPACE DW_INDEXES PARALLEL PCTFREE 0 NOLOGGING COMPUTE STATISTICS;
    CREATE BITMAP INDEX RSB_FACT_FLOW_SD_IX10 ON RSB_FACT_FLOW_SD
    (RECEIVED_DATE) TABLESPACE DW_INDEXES PARALLEL PCTFREE 0 NOLOGGING COMPUTE STATISTICS;
    CREATE BITMAP INDEX RSB_FACT_FLOW_SD_IX11 ON RSB_FACT_FLOW_SD
    (FLOW_DATE) TABLESPACE DW_INDEXES PARALLEL PCTFREE 0 NOLOGGING COMPUTE STATISTICS;
    CREATE BITMAP INDEX RSB_FACT_FLOW_SD_IX12 ON RSB_FACT_FLOW_SD
    (CUSTOMER_SEGMENT_SK) TABLESPACE DW_INDEXES PARALLEL PCTFREE 0 NOLOGGING COMPUTE STATISTICS;
    CREATE BITMAP INDEX RSB_FACT_FLOW_SD_IX13 ON RSB_FACT_FLOW_SD
    (BRAND_PARTNER_SK) TABLESPACE DW_INDEXES PARALLEL PCTFREE 0 NOLOGGING COMPUTE STATISTICS;
    If I drop the indexes on the table then the error goes away.
    Any ideas??
    Sheena

    ( SELECT 1
    FROM RSB_FACT_FLOW_SD A,
    RSB_DIM_FLOW B
    WHERE
    A.MPR_SK = FLOW.MPR_SK
    AND A.RECEIVED_DATE >= FLOW.RECEIVED_DATE =====>>>>
    AND B.FLOW_SK= A.FLOW_SK
    AND B.FLOW_ID= 'WAO2'
    AND A.REASON= '02CRO'
    Your sub query has the problem.
    You didn't list flow table in the subquery, therefore, you subquery, dont understand about the column.
    specify flow table in the subquery.
    Your outquery tables doesn't recognized in the sub query.
    Jaffar

  • ORA-00904: "YEAR": invalid identifier

    Hi,
    I am getting ORA-00904: "YEAR": invalid identifier error while running the following query.
    This query was written in MySQL and being migrated to Oracle.
    The problem is in where clause as i am unable to migrate the YEAR,MONTHNAME
    "diet_details.diet_date = 01-JUL-12"
    SELECT
    diet_details.diet_id AS diet_id,
    diet_details.diet_combination_id AS diet_combination_id,
    count(diet_details.diet_details_id)AS count,
    mas_diet_combination.diet_combination_name AS mas_diet_combination_name,
    diet_details.diet_date AS diet_diet_date,
    diet_details.diet_details_id AS diet_diet_details_id,
    mas_department.department_name AS mas_department_name,
    mas_hospital.hospital_name AS mas_hospital_name
    FROM
    mas_diet_combination RIGHT OUTER JOIN diet_details ON mas_diet_combination.diet_combination_id = diet_details.diet_combination_id
    LEFT OUTER JOIN mas_department ON diet_details.department_id = mas_department.department_id
    LEFT OUTER JOIN mas_hospital ON diet_details.hospital_id = mas_hospital.hospital_id
    WHERE
    monthname(diet_details.diet_date) =JUL
    and year(diet_details.diet_date) = 12
    and diet_details.department_id = 11
    GROUP BY
    diet_details.diet_id,
    diet_details.diet_combination_id,
    diet_details.diet_details_id,
    mas_diet_combination.diet_combination_name,
    diet_details.diet_date,
    diet_details.diet_details_id,
    mas_department.department_name,
    mas_hospital.hospital_name
    order by mas_diet_combination.diet_combination_id

    Instead of YEAR, MONTHNAME, use the to_char function.
    e.g
    where to_char(diet_details.diet_date,'MON-YYYY') = 'JUL-2012'

Maybe you are looking for

  • List of purchase orders is empty on Goods Receipt PO

    Hi, a user can't see the purchase order lists (empty result) when he clicks the "copy from" button on Good Receipt PO, although he just added several new purchase orders (hence they are still open). The weird thing is, another user with the same auth

  • HP C4480, OS Vista, SP1-Printer will not print documents

    Please Help! I have a C4480 all in one printer and it prints great pictures on photo paper, but it will not print documents. If it does choose to print something, then the text is in grey, although I have it set to print in black, and it prints some

  • Photosmart 7960 having color issues

    I have been running my 7960 with no complaints under Windows xp for many years now.  About 3 months ago when I try and print in color it will have to much green tint.  I have tried color management on/off.  Switch between RGB and Adobe.  Even when I

  • Netflix streaming video freezes but audio is ok...

    When I'm watching Netflix streaming videos, Firefox video freezes. Audio is fine and I can continue hearing the video. Firefox is the only browser that does this. IE9 and Google Chrome plays without the video freezing. I love Firefox and would like t

  • [solved] network

    Hi all, I've been trying to set network working on my desktop but haven't been succeeded till now.. I noticed a weird situation (at least to me) if I do ping google: ping -c 3 www.google.com I'll get in the final statistics time = 11149ms but if I do