Invalid identifier in the procedure

Hi all

I have an example of how I'm trying to pass two arguments.

Unfortunately, when I do that, I get the below error:
ORA-00904: "V_END_DATE": invalid identifier
ORA-06512: at "PROCEXAMPLE", line 10
ORA-06512: at line 2

Before I remove the rest of my hair, is - it possible to let me know what goes wrong? I know what means the error but I don't see where I have, I got an invalid identifier. Even on line 10. : P


ARGUMENTS TO PASS TO THE PROCEDURE
BEGIN
    procExample (   p_start_date => '01/01/2011', 
                        p_end_date => '07/01/2011') ;
END  
;
PROCEDURE
{
CREATE OR REPLACE PROCEDURE procExample (p_start_date in varchar2, p_end_date in varchar2) is
date of v_start_date;
date of v_end_date;

Start
v_start_date: = to_date(p_start_date,'dd/mm/yyyy');
v_end_date: = to_date(p_end_date,'dd/mm/yyyy');

EXECUTE IMMEDIATE ' CREATE TABLE test_a AS
SELECT v_start_date, v_end_date FROM DUAL';
end procExample;
}

Hello

When you use EXECUTE IMMEDIATE, you pass a string to the database must be executed in the database engine, where nothing is known about local variables in your procedure, such as v_start_date. There are ways to pass variables in an EXECUTE IMMEDIATE statement, but not in the context of the deifinitions column. About the closest thing you can do is:

CREATE OR REPLACE PROCEDURE procExample ( p_start_date IN VARCHAR2
                                        , p_end_date   IN VARCHAR2
                         )
IS
    sql_txt         VARCHAR2 (500);
begin
    sql_txt := 'CREATE TABLE test_a '
             || 'AS '
         || 'SELECT  TO_DATE (''' || p_start_date || ''', ''dd/mm/yyyy'') AS dt_1 '
         || ',       TO_DATE (''' || p_end_date   || ''', ''dd/mm/yyyy'') AS dt_2 '
         || 'FROM     dual';

    dbms_output.put_line (sql_txt || ' = sql_txt');     -- For debugging

    EXECUTE IMMEDIATE sql_txt;
end procExample;
/
SHOW ERRORS

Creating tables in procedures is not usually a good idea. Why do you need to do this in PL/SQL?

Since you know that the columns are DATEs, you can simply create the table with two columns DATE and not use CREATE TABLE As. It would be less prone, although you would need to separate INSERT statements.
Don't forget to provide names for the columns.

Whenever you write dynamic SQL code, it is a good idea to put all the text in a variable, so that you can view before you run, for debugging purposes. After the test is finished, you can comment or remove the call to dbms_output.put_line.

Tags: Database

Similar Questions

  • Subselect query returns "invalid identifier", but the nested query return lines

    I don't think it's a general SQL question.

    Select * from persons where person_id in)

    Select person_id with people whose name = 'Obama' - subquery

    ) and age > 18;

    When I run the subquery, I get:

    ORA-00904: "PERSON_ID": invalid identifier

    00904, 00000 - '% s: invalid identifier '.

    * Cause:

    * Action:

    Error on line: column 5: 8

    This is because the table people do not have the person_id field.

    But when I run the nested together query it returns all the lines in people with the AGE greater than 18.

    How is he succeeds when the subquery is obviously wrong?

    363f652b-263D-4418-933F-74a1d0a41b4c wrote:

    I don't think it's a general SQL question.

    Select * from persons where person_id in)

    Select person_id with people whose name = 'Obama' - subquery

    ) and age > 18;

    When I run the subquery, I get:

    ORA-00904: "PERSON_ID": invalid identifier

    00904, 00000 - '% s: invalid identifier '.

    * Cause:

    * Action:

    Error on line: column 5: 8

    This is because the table people do not have the person_id field.

    But when I run the nested together query it returns all the lines in people with the AGE greater than 18.

    How is he succeeds when the subquery is obviously wrong?

    Yes - this is a general SQL question and ask often enough.

    Correlated subqueries depend on the inner query, be able to see and access to the columns of the outer query. Normally see you referenced in the WHERE clause of the subquery and not in the SELECT clause, but the reference is valid in both places. This works because the columns of the tables in the main query are accessible in the subquery. "Person_id" is probably a column in the table 'people '.

    Which can be a cause of problems 'odd' when the column (in your case "person_id") is more of a table.

    Use an alias in the subquery in the subquery and you will find that it will not succeed.

    See these two articles AskTom where he addresses this specific issue

    http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:3317493900346468494

    http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:155200640564

  • Invalid identifier on the Select statement

    New to SQL. I'm having some trouble with a function.
    Assignment is:
    1. develop and execute a CREATE FUNCTION statement to create the DAY_ORD_SF function. Use the column DTCREATED table bb_basket as the date that the basket was created. Call the function TO_CHAR using the option of the DAY to extract the day of the week for a date value.
    1. create a SELECT statement that lists the basket id and the day of the week set for each basket.
    3. create a SELECT with a GROUP BY clause query to list the total number of baskets by day of the week. Who is the most popular of a day shopping? (Should discover that it is FRIDAY).

    So far, I have the function:
    CREATE OR REPLACE FUNCTION DAY_ORD_SF (P_ORDER_DATE IN BB_BASKET.DTORDERED%TYPE)
     RETURN VARCHAR2
     IS
       LV_DAY_WK VARCHAR2(3);
    BEGIN
     SELECT TO_CHAR(P_ORDER_DATE, 'DAY') 
      INTO LV_DAY_WK
      FROM BB_BASKET
      WHERE P_ORDER_DATE = DTORDERED;
     RETURN LV_DAY_WK;
    END;
    /
    Have you tried a select invalid identifier and get on o_dt. have you tried several different variables and impossible to find one that works.
    SELECT DAY_ORD_SF(O_DT) "DAY", COUNT(*)
    FROM BB_BASKET
    GROUP BY DAY_ORD_SF(O_DT)
    ;
    Any help would be appreciated.

    >
    DTCREATED is a column name in the table BB_BASKET. When I pass O_DT to DTCREATED, I get an error:
    >
    So track what causes this error. Your instructions were to use DTCREATED.

    You use this query in your service

    SELECT TO_CHAR(P_ORDER_DATE, 'DAY')
      INTO LV_DAY_WK
      FROM BB_BASKET
      WHERE P_ORDER_DATE = DTORDERED;
    

    And the error tells you that LV_DAY_WK is too small. Why is it too small? Look at how it is defined and then look at the results of this query

    SELECT TO_CHAR(DTCREATED, 'DAY')
      FROM BB_BASKET
    

    and see if you can see what the problem is.

    You do your development backward. Failed to start by trying to call a function that does not work. And you can't start by writing a function that includes queries that have not been tested.

    The right way to generate code is to create simple components. Then test these simple components (for example a query) to ensure they work. Then mix the simple components in a component more complex as a function. Then, you can test the function of another request call.

    The key is to start with simple things that work.

  • Get the error invalid identifier in the left outer join

    I wrote a query and get the invalid identifier error during execution:
    the exact error is: ORA-00904: "D". "" ACCT_NO ": invalid identifier
    This query is not able to access the parent table alias in the subquery of the left outer join.

    This is the query:
    SELECT D.PROD_DESC_TX, BASE. ASSET_NUM, BASE. PROD_ID, BASE.NAME
    OF TABLE1 D
    LEFT OUTER JOIN
    (
    SELECT ASSET_NUM, PROD_ID, B.SID
    FROM TABLE2 E
    JOIN IN-HOUSE TABLE3 HAS IT E.PROD_ID = A.ROW_ID
    JOIN INTERNAL TABLE 4 C ON A.PAR_PROD_INT_ID = C.ROW_ID
    INTERNAL TABLE5 JOIN B ON C.ROW_ID = B.PAR_ROW_ID
    AND B.TYPE = 'VALUE '.
    AND B.NAME = 'VALUE '.
    WHERE E.ASSET_NUM = ((CASE WHEN LTRIM (RTRIM (D.BANK_NO)) = '021 ' THEN '021' ELSE ' 020' END) |) LTRIM (RTRIM (D.APPL_CD)). LTRIM (RTRIM (D.ACCT_NO)))
    ) BASE ON ((CASE WHEN LTRIM (RTRIM (D.BANK_NO)) = '021 ' THEN '021' ELSE ' 020' END) |) LTRIM (RTRIM (D.APPL_CD)). LTRIM (RTRIM (D.ACCT_NO))) = BASE. ASSET_NUM
    WHERE D.BANK_NO = 'VALUE '.
    AND D.APPL_CD = 'VALUE '.
    AND D.ACCT_NO = 'VALUE '.

    Edited by: user648525 13 Sep, 2011 01:21

    I can easily look at your request at this time (using my iPhone on a train).

    But trying out this line in the WHERE (the one with the invalid reference) clause in the main query.

    Who is... in the view of inline, use only the logic of the join (the clauses).

    Overflow the filtering logic (WHERE clause) to the main request. You may need to select some additional inline view columns to make these references work.

  • ORA-00904 invalid identifier with the insert command

    Please inform me of what's wrong with insert.




    Declare
    cursor c1 is
    Select column_name as Column_namee, data type data_type, data_length as datalen ALL_TAB_COLUMNS where table_name = upper('ALI');
    temp_col_names varchar2 (1000);

    BEGIN
    for j in loop c1

    temp_col_names: = temp_col_names | j.column_namee | «, » ;

    end loop;
    Select substr (temp_col_names, 0, length (temp_col_names)-1) in the double temp_col_names;

    dbms_output.put_line (temp_col_names);

    INSERT INTO temp_col_names (temp_col_names) SELECT id WHERE Ali ali2 = 4;


    END;

    This means that there is no temp_col_names of the column in the table ALI2. Looks like you are the dynamic SQL search - you want to insert all the table columns ALI in the same set of columns in table ALI2, right? Then use:

    EXECUTE IMMEDIATE ' INSERT INTO ali2 (' | temp_col_names |) ') SELECT ' | temp_col_names | "Ali WHERE id = 4';

    SY.

  • ODI: Error invalid identifiers in "insert stream I$ table. '

    Hello

    I am trying to write a temporary interface (yellow), which will act as a source for a standard interface (in blue).

    However when I run the standard interface, I get the error on step 8 - integration: Insert flow I$ table

    ODI-1228: CR_2 (integration) task fails on the connection target ORACLE ORACLE_Local.

    Caused by: java.sql.SQLSyntaxErrorException: ORA-00904: "T". "" R_id ": invalid identifier

    The target code:

    / * DETECTION_STRATEGY = NOT_EXISTS * /.

    Insert / * + append * / in THE_SCHEMA. I _CR_TABLE $

    (

    CNUMBER,

    R_ID,

    IND_UPDATE

    )

    Select

    CNUMBER,

    R_ID,

    IND_UPDATE

    de)

    Select

    C1_CNUMBER CNUMBER,

    C2_R_ID R_ID,

    'I' IND_UPDATE

    of THE_SCHEMA. C$ _0CR_TABLE

    where (1 = 1)

    ) S

    If NOT EXISTS

    (select 1 from THE_SCHEMA. CR_TABLE T

    where T.R_ID = S.R_ID

    and ((T.CNUMBER = S.CNUMBER) or (T.CNUMBER IS NULL and S.CNUMBER IS NULL))

    )

    Source : DB2 v9.1.0.7,.

    Target : database Oracle 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    ODI v11.1.1

    On the standard interface:

    I set the box "use the temporary interface as an underlying table (subselect).

    R_ID field on the target table is the key field. It is mapped to one of the fields in the interface of temp and it the value "run on: Source" with set of Insert and Update check boxes.

    I use SQL LKM for Oracle components to get the data from the interface of the target temp.

    On the interface of temp:

    No key for each field in the target field

    IKM DB2 using updated incremental, FLOW_CONTROL with STATIC_CONTROL set to false.

    Any help would be greatly appreciated!

    In the target database, I changed the name of the field R_ID... but I forgot to update this column in the ODI of the table model. Once I have updated the model and mappings, the interface ran as expected.

  • PL/SQL: ORA-00904: invalid identifier (DG4ODBC 11.2.0.2 & MySQL)

    I have a PL/SQL script, processing of information between Oracle and MySQL databases. My script runs perfectly with DG4ODBC 11.1.0.7. Then we went from Oracle 10.2.0 and 11.2.0.2 DG4ODBC. Now, if I run my script from command line Solaris love. / myscript.shl, I get the following errors:

    PL/SQL: ORA-00904: "cmswhit_moodle1." "" "" mdl_grade_grades "." finalgrade ": invalid identifier.

    PL/SQL: ORA-00904: "cmswhit_moodle1." "" "" mdl_question_states '. "the attempt": invalid identifier "

    The strange thing is that if I run the same query by cut and paste in sqlplus command line, the application works perfectly without any problems.

    What is the cause of this problem?

    Any help would be greatly appreciated.

    Jeffrey

    Hi Klaus,

    The problem has been resolved after I upgraded MySQL ODBC to a new version of 5.1.8 to 5.1.13.

    Summary of the problem and its solution:

    The problem: It seems that dg4odbc 11.2.0.2 requires a newer version of MyODBC. Previously, I used MyODBC 5.1.8, which ran into problems with dg4odbc 11.20.0.2.

    The Solution: After that I upgraded 5.1.13 MyODBC, my PL/SQL scripts all work.

    I need to point out that with that MyODBC 5.1.8, I can run queries and updates to SQL * more console, but now the PL/SQL scripts.

    I'm going to close this message.

    Once again, thank you and happy holidays.

    Jeffrey

  • pop-up window begins to show by ask me 2 activate, when I followed the procedure, he tell me that my product key invalid, 0xc004c008 error code

    I work with my home premium Windows 7 for 2 years now, produced original, a real 2 months ago are beginning to show by asking the window 2 turn on, when I followed the procedure, he tell me that my invalid product key, 0xc004c008 error code, pls help

    Original title: product key problem

    Please run the Microsoft Genuine Diagnostics Tool then copy and paste the results into an answer here for further analysis:
    http://go.Microsoft.com/fwlink/?LinkId=52012

    Have you tried to restart by phone?

    How to activate Windows 7 manually (activate by phone)

    1) click Start and in the search for box type: slui.exe 4

    (2) press the ENTER"" key.

    (3) select your "country" in the list.

    (4) choose the option "activate phone".

    (5) stay on the phone (do not select/press all options) and wait for a person to help you with the activation.

    (6) explain your problem clearly to the support person.

    http://support.Microsoft.com/kb/950929/en-us

    See the following topics:

    http://Windows.Microsoft.com/en-us/Windows7/Windows-7-activation-error-0xC004C008

  • "ORA-00904 of invalid identifier", what's the problem?

    Hey,.

    I am trying to create very basic (via Script Editor) 4 tables in Application Express 4.1.0.00.32 and get this error and cannot understand why. If anyone can point out where I am going wrong would be perfect!

    Here's the script:

    ----------

    Drop TABLE County CASCADE CONSTRAINTS ;

    Drop TABLE City CASCADE CONSTRAINTS ;

    Drop TABLE Offence CASCADE CONSTRAINTS ;

    Drop TABLE Region CASCADE CONSTRAINTS ;


    CREATE TABLE County (

    PRIMARY County_Name VARCHAR2()55) KEY

        Rental VARCHAR2 (55) ,

        Details VARCHAR2 (222) );


    CREATE TABLE Offence (

        Offence_ID NUMBER (3) PRIMARY KEY ,

    Offence_Desc VARCHAR2()333)

    Offence_Type VARCHAR2()111() NOT NULL

        Date DATE NOT NULL ,

        Time NUMBER (5) ,

    County_Name VARCHAR2()55( ) REFERENCES County()County_Name)

    City_Name VARCHAR2()55( ) REFERENCES City()short-term()

    Region_Name VARCHAR2()55( ) REFERENCES region()rated()()


    CREATE TABLE City (

    County_Name VARCHAR2()55( ) REFERENCES County()County_Name)

    PRIMARY City_Name VARCHAR2()55) KEY

        PostCode VARCHAR (8) NOT NULL ,

        House # NUMBER (3) NOT NULL ,

        Street VARCHAR2 (55) ,

        Town VARCHAR2 (55) ,

        Building_Name VARCHAR2 (55) );

    CREATE TABLE Region (

    PRIMARY Region_Name VARCHAR2()55) KEY

        City VARCHAR2 (55) NOT NULL ,

        Est_Population NUMBER (9) NOT NULL );

    -----------


    The error I get in the summary when I run the script is:

    6 «»0.00CREATE TABLE offence (Offence_ID NUMBER PRIMARY KEY (3),)"ORA-00904: invalid identifier.

    So I guess it's related to the "Offence_ID" line (designed as the primary key / identifier), but I don't see a problem.

    Any help is greatly appreciated!

    The DATE is an Oracle reserved word.

    Oracle reserved words and keywords

    SQL > create table test_tbl

    () 2

    3 date default sysdate

    4  );

    date default sysdate

    *

    ERROR at line 3:

    ORA-00904: invalid identifier

    SQL > create table test_tbl

    () 2

    3 'DATE' date default sysdate

    4  );

    Table created.

    I wouldn't recommend do not name your DATE column, but to use something like Offence_date instead.

  • PL/SQL: ORA-00904 invalid identifier, PLS-00225: reference of the subprogram or cursor is out of reach

    Hi gurus,

    Your help is greatly appreciated.

    Will I have a fucntion where we have the object it contains.

    The changes that I have doen are: 2 new cusrosrs, but its failure with the error below.

    Highlighted are the changes I made. his length very well before your help is greatly appreciated.

    1) PL/SQL: ORA-00904: "GET_ACQ_ID.". ' ACQ_ID ': invalid identifier.

    (2) PLS-00225: subprogram or cursor reference 'GET_ACQ_ID' is out of range

    Here is the code:

    _________________________________________________________________________

    FUNCTION GET_IP_COMM_INFO return PROD. TERMINAL_IP_COMM_INFO_TAB IS

    vTer TER.ter_id%TYPE;
    vAPPL_ID TAC.appl_id%TYPE;
    vValue TSF.vALUE%TYPE;

    IP_COMM_INFO_LIST PROD. TERMINAL_IP_COMM_INFO_TAB: = PROD. TERMINAL_IP_COMM_INFO_TAB();

    CURSOR GET_ACQ_ID IS
    SELECT ACQ_ID
    TER TAHA, MERC M, PROF
    WHERE T.MER_ID = M.MER_ID
    AND M.PROFID = P.PROF_ID
    AND T.TER_ID = vTer_id;


    CURSOR GET_INFO_CURSOR IS
    SELECT H.DESCRIPTION AS HOST_DESCRIPTION
    PROD. HOST H, PROD. APP_IP_COMM_ACCESS_INFO AICAI
    WHERE (AICAI. HOST_ID = H.HOST_ID) and
    (AICAI. APPL_ID = vAPPL_ID);

    CURSOR GET_ACQ_CURSOR IS
    SELECT H.DESCRIPTION AS HOST_DESCRIPTION
    PROD. HOST H, PROD. APP_IP_COMM_ACCESS_INFO AICAI, PROD. ACQUIRER_IP_COMM_ACCESS_INFO ACICAI
    WHERE (AICAI. HOST_ID = H.HOST_ID) and
    (AICAI. APPL_ID = vAPPL_ID) AND
    (ACQUIRER_ID = GET_ACQ_ID. ACQ_ID);
    BEGIN

    vTer_id: = GLOBAL_VARIABLES.gv_ref_Ter_id;

    BEGIN
    SELECT the VALUE IN vvalue OF Tsf
    WHERE TER_id = vTEr_ID AND APPL_ID is vAPPL_ID and FEATURE_ID = 861;.

    Vvalue = '04' IF THEN
    For GET_ACQ_REC IN GET_ACQ_CURSOR
    LOOP
    IP_COMM_INFO_LIST. EXTEND;
    IP_COMM_INFO_LIST (IP_COMM_INFO_LIST. (COUNTY): = PROD. TERMINAL_IP_COMM_INFO_OBJ (GET_ACQ_REC. HOST_DESCRIPTION);
    END LOOP;
    ON THE OTHER
    FOR GET_INFO_REC IN GET_INFO_CURSOR
    LOOP
    IP_COMM_INFO_LIST. EXTEND;
    IP_COMM_INFO_LIST (IP_COMM_INFO_LIST. (COUNTY): = PROD. TERMINAL_IP_COMM_INFO_OBJ (GET_INFO_REC. HOST_DESCRIPTION);
    END LOOP;
    END IF;

    RETURN IP_COMM_INFO_LIST;
    EXCEPTION WHEN OTHERS THEN
    LIFT;
    END GET_IP_COMM_INFO;

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

    You try to access another variable of slider within the slider...

    CURSOR GET_ACQ_CURSOR IS

    SELECT H.DESCRIPTION AS HOST_DESCRIPTION

    PROD. HOST H, PROD. APP_IP_COMM_ACCESS_INFO AICAI, PROD. ACQUIRER_IP_COMM_ACCESS_INFO ACICAI

    WHERE (AICAI. HOST_ID = H.HOST_ID) and

    (AICAI. APPL_ID = vAPPL_ID) AND

    (ACQUIRER_ID = GET_ACQ_ID. ACQ_ID );

    But you have not opened this slider, or anything like that.

    You will probably need to pass as a parameter, just like a function:

    (not sure of the type of data, so I assumed that the NUMBER)

    CURSOR GET_ACQ_CURSOR (NUMBER in_acq_id) IS

    SELECT H.DESCRIPTION AS HOST_DESCRIPTION

    PROD. HOST H, PROD. APP_IP_COMM_ACCESS_INFO AICAI, PROD. ACQUIRER_IP_COMM_ACCESS_INFO ACICAI

    WHERE (AICAI. HOST_ID = H.HOST_ID) and

    (AICAI. APPL_ID = vAPPL_ID) AND

    (ACQUIRER_ID = in_acq_id );

    When you call this type, you must pass a value... So, it seems that you first call the other cursor.

    Change this code:

    IF Vvalue = ' 04 "THEN

    FOR GET_ACQ_REC IN GET_ACQ_CURSOR

    LOOP

    IP_COMM_INFO_LIST. EXTEND;

    IP_COMM_INFO_LIST (IP_COMM_INFO_LIST. (COUNTY): = PROD. TERMINAL_IP_COMM_INFO_OBJ (GET_ACQ_REC. HOST_DESCRIPTION);

    END LOOP;

    ON THE OTHER

    To do this:

    IF Vvalue = ' 04 "THEN

    FOR GET_ACQ_ID_REC IN GET_ACQ_ID IS

    LOOP

    FOR GET_ACQ_REC IN GET_ACQ_CURSOR (get_acq_id_rec.acq_id)

    LOOP

    IP_COMM_INFO_LIST. EXTEND;

    IP_COMM_INFO_LIST (IP_COMM_INFO_LIST. (COUNTY): = PROD. TERMINAL_IP_COMM_INFO_OBJ (GET_ACQ_REC. HOST_DESCRIPTION);

    END LOOP;

    END LOOP;

    ON THE OTHER

    (Or something like that)

    I wasn't sure if your GET_ACQ_ID cursor returns only 1 row or not? If it returns more than 1 row, how to cope, you do not specify.

    If it's just 1 row, then you can probably simplify it a little more:

    IF Vvalue = ' 04 "THEN

    SELECT ACQ_ID

    in l_acq_id

    TER TAHA, MERC M, PROF

    WHERE T.MER_ID = M.MER_ID

    AND M.PROFID = P.PROF_ID

    AND T.TER_ID = vTer_id;

    FOR GET_ACQ_REC IN GET_ACQ_CURSOR (l_acq_id)

    LOOP

    IP_COMM_INFO_LIST. EXTEND;

    IP_COMM_INFO_LIST (IP_COMM_INFO_LIST. (COUNTY): = PROD. TERMINAL_IP_COMM_INFO_OBJ (GET_ACQ_REC. HOST_DESCRIPTION);

    END LOOP;

    ON THE OTHER

    Hope that helps.

  • views get invalid when the procedure is changed

    Hello
    When a procedure is changed and therefore newly compiled some views according to are reported as 'invalid '. For this reason the following application generates errors. How could it be created to complie based on all of the objects (e.g. views) when the procedure gets compiled?

    Rgds
    Jan

    The coil of the output of the select statement in a file and then run the file:

    Select 'Edit'. "replace (object_type, 'BODY of PACKAGE', 'PACKAGE') | '|| object_name |' compile; »
    from user_objects
    When status = 'INVALID';

    It compiles all invalid objects of a user. After execution, you can repeat the step if the compilation of an object struck again a few other objects - select till does not any new release.

    Kind regards
    Monika

  • Apps BI - workflow task has received the error "invalid identifier".

    Hi all

    I'm loading acreage subject of projects using the client CAD for 11.5.10 container. And my Oracle EBS 11.5.10 only data source. Few of the workflow tasks failed. For example: "SDE_ORA_TaksDimension." When I checked the logs of session, its display like "ORA-00904 'PA_PROJ_ELEMENT_VERSIONS'." FINANCIAL_TASK_FLAG ': invalid identifier "error of a few paintings of projects (PA). I checked in the database to Oracle 11.5.10 and noticed that the column (FINANCIAL_TASK_FLAG) itself is not there in the table (PA_PROJ_ELEMENT_VERSIONS).
    I also checked SDE_ORA_TaksDimension in "SDE_ORA11510_Adaptor" mapping in the table PA_PROJ_ELEMENT_VERSIONS Design, Informatica PowerCenter Workflow is to have the column with "FINANCIAL_TASK_FLAG".

    In other words, there are some differences between available "SDE_ORA11510_Adaptor" and Oracle EBS 11.5.10 database. Could someone please help me or guide me to solve this problem?

    Thank you
    Harish Nunn

    This is probably because you do not have the PRE REQUISIUTE following for PROJECT ANALYTICS for 11.5.10:

    requires the Family Pack M (11i. PJ_PF. (M) to be applied to Oracle eBusiness Suite 11.5.10.

    You need to run the analytical project.

    Check the answer as CORRECT

  • move the lob segment fails with invalid identifier

    Why this fails:

    SQL > desc APPLSYS. WF_INBOUND_TABLE
    Name Null? Type
    ----------------------------------------- -------- ----------------------------
    Q_NAME VARCHAR2 (30)
    MSGID NOT NULL RAW (16)
    CORRID'ART VARCHAR2 (128)
    PRIORITY NUMBER
    NUMBER OF THE STATE
    TIMESTAMP DELAY (6)
    NUMBER OF EXPIRY
    TIME_MANAGER_INFO TIMESTAMP (6)
    NUMBER OF LOCAL_ORDER_NO
    NUMBER OF CHAIN_NO
    NUMBER OF THE CSCN
    DSCN NUMBER
    ENQ_TIME TIMESTAMP (6)
    NUMBER OF ENQ_UID
    ENQ_TID VARCHAR2 (30)
    DEQ_TIME TIMESTAMP (6)
    NUMBER OF DEQ_UID
    DEQ_TID VARCHAR2 (30)
    NUMBER OF RETRY_COUNT
    EXCEPTION_QSCHEMA VARCHAR2 (30)
    EXCEPTION_QUEUE VARCHAR2 (30)
    NUMBER OF STEP_NO
    NUMBER OF RECIPIENT_KEY
    DEQUEUE_MSGID RAW (16)
    USER_DATA SYSTEM. WF_PAYLOAD_T
    SENDER_NAME VARCHAR2 (30)
    SENDER_ADDRESS VARCHAR2 (1024)
    NUMBER OF SENDER_PROTOCOL
    ANYDATA USER_PROP


    SQL > alter table APPLSYS. WF_INBOUND_TABLE move TABLESPACE APPS_TS_TX_DATA;

    Modified table.

    SQL > ALTER TABLE APPLSYS. WF_INBOUND_TABLE MOVE LOB (USER_PROP) STORE DID (TABLESPACE APPS_TS_TX_DATA);
    *
    ERROR on line 1:
    ORA-00904: "USER_PROP": invalid identifier

    user600570 wrote:
    Well, no matter what the type is be, how to move to this segment?

    The segment does not move when the corresponding table is moved to new tablespace?
    At least that's what I see.

    SQL> select * from v$version ;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE     10.2.0.4.0     Production
    TNS for Solaris: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    
    SQL> create table t nologging as select * from applsys.wf_inbound_table where 1 = 2 ;
    
    Table created.
    
    SQL> select dbms_metadata.get_ddl('TABLE','T') from dual ;
    
    DBMS_METADATA.GET_DDL('TABLE','T')
    --------------------------------------------------------------------------------
    
      CREATE TABLE "APPS"."T"
       (     "Q_NAME" VARCHAR2(30),
         "MSGID" RAW(16),
         "CORRID" VARCHAR2(128),
         "PRIORITY" NUMBER,
         "STATE" NUMBER,
         "DELAY" TIMESTAMP (6),
         "EXPIRATION" NUMBER,
         "TIME_MANAGER_INFO" TIMESTAMP (6),
         "LOCAL_ORDER_NO" NUMBER,
         "CHAIN_NO" NUMBER,
         "CSCN" NUMBER,
         "DSCN" NUMBER,
         "ENQ_TIME" TIMESTAMP (6),
         "ENQ_UID" NUMBER,
         "ENQ_TID" VARCHAR2(30),
         "DEQ_TIME" TIMESTAMP (6),
         "DEQ_UID" NUMBER,
         "DEQ_TID" VARCHAR2(30),
         "RETRY_COUNT" NUMBER,
         "EXCEPTION_QSCHEMA" VARCHAR2(30),
         "EXCEPTION_QUEUE" VARCHAR2(30),
         "STEP_NO" NUMBER,
         "RECIPIENT_KEY" NUMBER,
         "DEQUEUE_MSGID" RAW(16),
         "USER_DATA" "SYSTEM"."WF_PAYLOAD_T" ,
         "SENDER_NAME" VARCHAR2(30),
         "SENDER_ADDRESS" VARCHAR2(1024),
         "SENDER_PROTOCOL" NUMBER,
         "USER_PROP" "SYS"."ANYDATA"
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS NOLOGGING
      STORAGE(INITIAL 40960 NEXT 40960 MINEXTENTS 1 MAXEXTENTS 505
      PCTINCREASE 50 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "APPLSYSD"
     OPAQUE TYPE "USER_PROP" STORE AS LOB (
      ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
      CACHE
      STORAGE(INITIAL 40960 NEXT 40960 MINEXTENTS 1 MAXEXTENTS 505
      PCTINCREASE 50 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))
    
    SQL> select owner, table_name, column_name, segment_name, tablespace_name from dba_lobs
      2  where table_name = 'T' ;
    
    OWNER                          TABLE_NAME
    ------------------------------ ------------------------------
    COLUMN_NAME
    -----------------------------------------------------------------------------------------------------------------------------------
    SEGMENT_NAME                   TABLESPACE_NAME
    ------------------------------ ------------------------------
    APPS                           T
    USER_PROP
    SYS_LOB0000365381C00035$$      APPLSYSD
    
    SQL> alter table t move tablespace APPLSYSX ;
    
    Table altered.
    
    SQL> select dbms_metadata.get_ddl('TABLE','T') from dual ;
    
    DBMS_METADATA.GET_DDL('TABLE','T')
    --------------------------------------------------------------------------------
    
      CREATE TABLE "APPS"."T"
       (     "Q_NAME" VARCHAR2(30),
         "MSGID" RAW(16),
         "CORRID" VARCHAR2(128),
         "PRIORITY" NUMBER,
         "STATE" NUMBER,
         "DELAY" TIMESTAMP (6),
         "EXPIRATION" NUMBER,
         "TIME_MANAGER_INFO" TIMESTAMP (6),
         "LOCAL_ORDER_NO" NUMBER,
         "CHAIN_NO" NUMBER,
         "CSCN" NUMBER,
         "DSCN" NUMBER,
         "ENQ_TIME" TIMESTAMP (6),
         "ENQ_UID" NUMBER,
         "ENQ_TID" VARCHAR2(30),
         "DEQ_TIME" TIMESTAMP (6),
         "DEQ_UID" NUMBER,
         "DEQ_TID" VARCHAR2(30),
         "RETRY_COUNT" NUMBER,
         "EXCEPTION_QSCHEMA" VARCHAR2(30),
         "EXCEPTION_QUEUE" VARCHAR2(30),
         "STEP_NO" NUMBER,
         "RECIPIENT_KEY" NUMBER,
         "DEQUEUE_MSGID" RAW(16),
         "USER_DATA" "SYSTEM"."WF_PAYLOAD_T" ,
         "SENDER_NAME" VARCHAR2(30),
         "SENDER_ADDRESS" VARCHAR2(1024),
         "SENDER_PROTOCOL" NUMBER,
         "USER_PROP" "SYS"."ANYDATA"
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS NOLOGGING
      STORAGE(INITIAL 40960 NEXT 40960 MINEXTENTS 1 MAXEXTENTS 505
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "APPLSYSX"
     OPAQUE TYPE "USER_PROP" STORE AS LOB (
      ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
      CACHE
      STORAGE(INITIAL 40960 NEXT 40960 MINEXTENTS 1 MAXEXTENTS 505
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))
    
    SQL> select owner, table_name, column_name, segment_name, tablespace_name from dba_lobs
      2  where table_name = 'T' ;
    
    OWNER                          TABLE_NAME
    ------------------------------ ------------------------------
    COLUMN_NAME
    -----------------------------------------------------------------------------------------------------------------------------------
    SEGMENT_NAME                   TABLESPACE_NAME
    ------------------------------ ------------------------------
    APPS                           T
    USER_PROP
    SYS_LOB0000365381C00035$$      APPLSYSX
    
    SQL> drop table t purge ;
    
    Table dropped.
    

    If you want to be able to move the segment to a different tablespace to the table, I guess that's not possible. Oracle only allows LOB to be stored in a separate tablespace as the corresponding table provided that they are defined as the LOBs explicitly during the creation of the table, unlike the LOB created by oracle internally because of the column datatype being ANYDATA as in this case.

  • INVALID IDENTIFIER error in the statement ON

    I have problems with this SELECT statement in a report with the search items. The item sought in Question matches the string "Email". Any activity record that 'Email' in the field of the activity_type must be selected. The line of code is:

    Select user_name, total of (select user_name, count (*) total from eba_ver2_cust_activity where activity_type = group e-mail user_name)
    order by 2 desc, desc 2

    There are some substitutions here. The 'Email' value is: P23_ACTIVITY_TYPE on the page.

    The error I get is:

    Failed to parse the SQL query:
    ORA-00904: "EMAIL": invalid identifier

    The problem is that the string constant is interpreted as an identifier name. Some sbustitutions are made to the general SELECT statement that fails. The relevant part of the code generating the wrong SELECTION is:

    If: P23_ACTIVITY_TYPE! = 'null' and: P23_ACTIVITY_TYPE is not null then
    If: P23_START_DATE is not null or: P23_END_DATE is not null then
    l_sql: = l_sql | "and activity_type_id = ' |: P23_ACTIVITY_TYPE;"
    on the other
    l_sql: = l_sql | "where activity_type_id = ' |: P23_ACTIVITY_TYPE;
    end if;

    Anyway, the content of: P23_ACTIVITY_TYPE are treated as means of identification instead of a string. Help, please.

    Steve "n00b" to Raleigh NC

    Hi Steve,.

    COBOL! If you've actually seen the real life before dinosaurs? ;) They still teach the last College I've heard...

    What is the error you see? It can be as Tony said above, that you do not close your last statement. Here is what should look like this block of code:

    if :P23_ACTIVITY_TYPE != '%null%' and :P23_ACTIVITY_TYPE is not null then
    if :P23_START_DATE is not null or :P23_END_DATE is not null then
    l_sql := l_sql || ' and activity_type_id = ''' || :P23_ACTIVITY_TYPE || '''';
    else
    l_sql := l_sql || ' where activity_type_id = ''' || :P23_ACTIVITY_TYPE || '''';
    end if;
    end if;
    

    Note This is a series of simple "quotes.

    Aaron

  • Creating the table and get the invalid identifier

    Thank you so much Ed (and all those who responded) to my previous post!, you all be extremely useful.

    In fact, I have another question... Can I repost a new thread or continue on this one?

    Here's my problem.

    create the table DonationEvent
    ('ID' NUMBER (1,1) Not Null,)
    "EventNumber" NUMBER (1,1) Not Null,
    'Type' char (30) Not Null,
    "OrganizerName' char (30) Not Null,
    'Location' char (30) Not Null,
    'Date' NUMBER (10.1) Not Null,
    'Time' char (30) Null,
    "DonationTotal" NUMBER (10.1) Not Null,

    Primary Key (ID),



    );

    Getting ORA-00904: invalid identifier

    Also I use Express Edition 10g, how can I get a view of context to see the line where error occurs?

    Cushgod wrote:
    I always get invalid identifiers... Your focus is so useful! My teacher is not useful. At his table did not work it would be copy and paste that work and say that he didn't had the time to debug it... I can't even say what my mistake is on in the Express edition...

    What do you use to write/test your sql? That's why I asked sqplus. This is the basic sql shell. In the examples I showed you I had by the sql in a text (doit.sql) file, shot to the top of sqlplus, connect to the base, execute "doit.sql".

    You're my only hope! Thank you very much in advance, I learn a little which makes me question why my teach would even use "" eventid NUMBER (1,1) not null "" after your explanation. " It's not supposed to have a decimal number to a primary key event IDS... anyway thanks in advance.

    create the table DONATIONEVENT
    (eventid NUMBER (5) Not Null,)
    eventnumber NUMBER (9) Not Null,
    EventType VARCHAR2 (30) Not Null,
    OrganizerName VARCHAR2 (30) Not Null,
    location VARCHAR2 (30) not Null,
    EventDate DATE Not Null,
    duration VARCHAR2 (30) Null,
    donationtotal NUMBER (10.2) Not Null,

    Primary Key (ID),

    );

    If I use a DATE instaed (4) no setting, I get "' missing right parenthesis"... once again. I counted my bracket and the match 10 (and 10)
    See below.

    DATE is right. Where did you get the idea of DATE (4)?

    The documentation site (tahiti.oracle.com) Oracle seems to be down at the moment, but you really, * really *, * REALLY * need to get there and take the reference SQL and SQL * reference manuals more.

    create the table DONATIONEVENT
    (eventid NUMBER (5) Not Null,)
    eventnumber NUMBER (9) Not Null,
    EventType VARCHAR2 (30) Not Null,
    OrganizerName VARCHAR2 (30) Not Null,
    location VARCHAR2 (30) not Null,
    EventDate DATE (4) Not Null,
    duration VARCHAR2 (30) Null,
    donationtotal NUMBER (10.2) Not Null,

    Primary Key (ID),

    );

Maybe you are looking for