Oracle Reserved Words in EJB Implementations

Hello Everybody!
Suppose there is a table in Oracle , say Account which has a column, say comment. comment is a reserved word in Oracle. I would like to know how Oracle reserved words are handled in EJB implementation. For example, suppose there is an enterprise application that accesses such a table using CMP beans, how would we specify the <field-map>
<field-map>
<cmp-field>comment</cmp-field>
<dbms-column>COMMENT</dbms-column>
</field-map>
This doesnt work because COMMENT is a reserved word in Oracle. In Oracle,
if we use comment as a column name, it has to be represented in double quotations.
for example, this select query doesnt work
select COMMENT from account;
these select queries works
select "COMMENT" from account;
select A."COMMENT" from account A;
Regarding the current EJB implementations, the question is whether they support Oracle reserved words in their mappings??
"COMMENT"s welcome
Thanks!
Manu Ramakrishnan

>
This doesnt work because COMMENT is a reserved word in
Oracle. In Oracle,
if we use comment as a column name, it has to be
represented in double quotations.
Did you try it?
Did you try it with double quotes?
The specs I looked at do not discuss this(jdbc, ejb, j2ee.) The ejb spec reserves as part of EJB QL some standard ANSI SQL reserved words and specifically suggests that other ANSI SQL reserved words should not be used.
And if I am reading the EJB QL section correctly identifiers (which would be a table, field names) do not allow quoted identifiers. Or at least they specifically do not allow fields with, for example, a space. This sort of name is specifically allowed for in ANSI SQL and has been since the first version of ANSI SQL. They also do not allow for case sensitive names, which again is allowed in ANSI SQL as part of a quoted identifier.
That suggests to me that you use reserved words that either you going to be using a non-J2EE feature of a container or it simply won't work in the first place.

Similar Messages

  • Tag is Oracle reserved word

    My XML document has the tag <DATE>. (an Oracle reserved word)
    My Oracle table has the column DATE. This was creating by enclosing the column name with quotes when creating the table.
    I assumed that a putXML would work since the SQL Reference manual says that Oracle considers DATE and "DATE" to be the same thing.
    However, when I run putXML, I get the error message "missing SELECT keyword encountered during processing ROW element 1".
    Does this XML file need to be preprocessed by XSLT to alter the DATE element, does getXML have a bug, or did I do something wrong?
    Thanks.

    Scott,
    <p>
    Yeah I know it is a bug but what I was not sure of is whether Product Development knew about it or not.
    <p>
    I was just letting Product Development know about it in case they did not already.
    <p>
    <b>Is there, or should there be, another (better) way of reporting bugs with Application Express to product development.</b>
    <p>
    Chris

  • Incomprehensible Oracle Reserved Word Error

    I'm trying to create a Table for a new application and I keep getting this error message:
    1 error has occurred
    The identified column name is an Oracle reserved word. Please choose another name.
    Unfortunately, it doesn't identify a column as containing a reserved word. I tried googling for a list of Oracle Reserved Words, Oracle Keywords, and PL/SQL Reserved Words; but none of them match the column names in my table. My column names are:
    PROJECT NAME (Aliases)     
    (C)USTOMER REQUEST or (IT) REQUEST     
    Priority (1= high)     
    PROJECT STATUS     
    PROJECT MANAGER     
    LAST STATUS     
    Link to Status     
    START DATE     
    ESTIMATED COMPLETION     
    NOTES     
    Report on Time?     
    Business Analyst     
    Technical Lead     
    Business Apps     
    DBA_Name     
    Systems     
    Network     
    NOC     
    CSC     
    Training      
    Communications     
    SME     
    Super User     
    Contracts     
    ERP     
    DBA_Name used to be DBA, which is a keyword, but when I changed it to DBA_Name, i got the same error. Please help.
    Steve in Raleigh NC

    Thanks. I'm using Oracle 11g. I think what you're suggesting would work, if the objective is to create an empty table and then populate it with data.
    However, what I'm trying to do is import a spreadsheet into APEX as a table, after which I shall build an application on that. If I do it your way, I'll have to key all the spreadsheet data in after creation, creating the possibility of keyed errors, which would require proof-reading. I'd prefer not to do that.
    This morning, before returning to this thread, I was able to import the spreadsheet by changing all the column names to the corresponding Excel column heads: A, B, C and so on. When I went to SQL workshop to rename the columns, I found only 10 had been imported. There are 22 columns in the spreadsheet, most of them populated, and we need them all.
    I believe I can still use the table I have created. I can add the extra 12 columns now, one at a time, and populate them by typing, if I must.
    However, if there's some constraint or constant I can alter to import all 22 columns with all the information in one pass, I would appreciate it. There are 53 rows. Keying 12 columns for all 53 would be something of a pain.
    Steve the n00b in Raleigh NC

  • Create App From Spreadsheet: "column name is an Oracle reserved word"

    I'm creating an App from a spreadsheet on apex.oracle.com (3.0.0.00.20 at time of writing) and receiving the error "The identified column name is an Oracle reserved word. Please choose another name."
    I've tried adding an underscore to the end of each column name in order to avoid having to check every column name (yup, lazy) but that didn't remove the error, nor is any column name identified by the interface.
    Thoughts?

    Hi David,
    There was a bug at one time where reserved words were not being checked properly when creating columns. A particular problem related to names beginning with "SYS".
    Try adding the underscore in front of the column name.
    Regards
    Andy

  • Oracle Reserve Words

    When creating entity names in Oracle Designer, can reserve words be used if they are part of a string? For instance CREATION DATE?
    And is it necessary to have underscore between all entity names before using the Database Design Transformer?

    When defining entities and attributes in Oracle designer, there is no need to use the underscore. In addition, if it is your intention to use the Database Design Transformer to full effect:
    1. Ensure the long name, short name and plural properties are defined for each entity.
    2. Do not create attributes for non-significant primary keys (those that will be generated by sequences)as the transformer will create these.
    3. Do not create attributes for foreign key relationships. Again these will be created by the transformer.
    4. When using the transformer, pay particular attention to all the options to make sure you want to use a particular one.

  • "MS" reserved word in oracle text query?

    Wondering if anyone has run into the string "MS" behaving as a reserved word in oracle text queries. For example, this specification returns all records from Texas:
    '<query>
    <textquery>
    <progression>
    <seq> TX WITHIN CUSTOMER_STATE </seq>
    </progression>
    </textquery>
    </query>'
    But this one does NOT find any results for Mississippi:
    '<query>
    <textquery>
    <progression>
    <seq> MS WITHIN CUSTOMER_STATE </seq>
    </progression>
    </textquery>
    </query>'
    I've confirmed we have data that should match, and I've tried escaping it with the sequences as described in the SQL docs (I've tried single quotes, pairs of single quotes, braces, and combinations of those) . And trying to find info on the web is tough since all web queries that contain 'MS' bring back tons of Microsoft-relevant information.
    Can anyone nudge me in the right direction for a better google-search, or some materials in these forums (my initial searches here didn't turn anything up either).
    Thanks for any feedback!
    jh

    Wondering if anyone has run into the string "MS" behaving as a reserved word in oracle text queries.Maybe because »MS« is in the default english stoplist?:
    English Default Stoplist.

  • I need to use a reserved word as parameter name in proc called from URL

    Let me preface this post by saying I already know this is terrible to attempt, but it's short term fix only.
    Ok, so I have to create a procedure that will be called by a vendors application via a API that calls our URL to send data over. The terrible part is
    that the API they have uses the parameter FROM=vendor_data A change is on the way so in the future the API won't use FROM as a paramter, so this isn't something I want to do, but it's a workaround.
    So the nastiness is this..., I can create a procedure that'll compile when I enclose FROM in double quotes "FROM" as my input parameter
    but if I try to call my procedure via URL (as their application will do) the procedure isn't working. I searched for someway to do an inline
    replace of the FROM parameter to something else, but no luck. I'm open to all positive comments. I cannot go outside of Oracle
    to do this, so I can't call a shell script and replace. Basically I need some way to use a reserved word as a parameter name, and then be able to call
    that proc from a URL, or someway to change the FROM in the URL inline. Any help on this admittedly whacky situation would be appreciated much.
    I tried ...\myproc?from=text
    ...\myproc?"from"=text
    ...\myproc?'from'=text
    proc is simple test procedure
    create or replace procedure myproc
    ("from" in varchar2 default 0)
    is
    v_from varchar2(30);
    begin
    v_from:="FROM";
    insert into test(col1) values(v_from);
    end;
    **** Update
    I didn't get any more replies but came to a solution that I thought I'd post. It's much better, more elegant and maybe can help others.
    So instead of using FROM as the parameter name I did some research and decided I can use flexible parameters. Basically you end up having
    2 input parameters for a procedure, one holds a parameter name the other holds the parameter value. They get loaded into arrays
    and you access the values with regular name_array(1), value_array(1), etc. ?v=parameter&v2=value
    Once I figued I could use flexible parameter it took me tons of research to find out the actual syntax. I'll post some examples for others
    later, but was suprised with the lack of resources consideriing how "flexible" they are.
    Thanks again for the replies. Cheers.
    Edited by: Mitz on Jul 29, 2009 11:37 PM

    Scott,
    Thanks for the reply. I'm not familiar with the wwv_flow_epg_include_mod_local, however I know that the
    myproc is available via URL. I passed the my procedure name(myproc) on to the dba a while back to make it "accessible" so, I'm assuming that he
    added it to this the www_flow_epg_mod_local (assuming this has something to do with access control).
    If I modify myproc procedure and remove "FROM" as the input variable, and replace with say,
    IN_FROM I can then call the procedure via the URL ./myproc?in_from=test without any problems.
    I'm pretty confident that it's the "FROM" that is the hurdle and not a security or setup issue. The proc is fine to call from the URL until I got the curveball that the only available parameter was FROM. How the URL should be when inputing to that parameter?
    Edited by: Mitz on Jul 25, 2009 7:36 PM
    Edited by: Mitz on Jul 25, 2009 9:16 PM

  • How to use reserved word in MAX() function?

    Hello, I migrated from SQL Server 7 to Oracle 8.1.7 and have to keep the same tables, columns etc names as it used to be in sql server. One of my tables have colunm called 'Row' and as far as I understand it's reserved word in Oracle
    I need to bypass it somehow in the following query:
    SELECT MAX(Row)
    FROM TableX
    I'll appreciate all ideas
    Thanks in advance
    Marina

    Hi,
    Try one of the following
    Select MAX("ROW")
    Select MAX("Row")
    be careful the double quotes (") make the Row case sensitive.
    Regards
    John

  • Oracle reserved and non-reserved keywords

    Hello,
    I'm looking for a list of reserved and non-reserved keywords for all Oracle versions starting from 9.
    I think Oracle starts at R1, right? So the versions needed would be:
    9.1, 9.2
    10.1, 10.2 and
    11.1
    I found lists of keywords querying Oracle view V$RESERVED_WORDS
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2048.htm#REFRN30204
    here:
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/ap_keywd.htm
    However, this is only for version 10.2 and it contains only reserved keywords.
    I need a list for every maintenance/minor version. This list must contain all keywords in Oracle PL/SQL, not just the reserved ones, but also those which shouldn't be used in certain contexts described by the V$RESERVED_WORDS view (former link) -> probably reserved = 'N'.
    Since I don't own a copy of Oracle and definitely not of every minor version, does anyone know where to obtain such lists?
    You might want to do me a favor and query that view for me... ;-) (you can send the output to "k w u t z k e AT w e b DOT d e" ... don't forget to mention the version)
    From what the view tells me, the SQL statements to query are:
    For reserved words:
    select keyword from v$reserved_words where reserved='Y' order by keyword;
    For all other non-reserved words:
    select keyword from v$reserved_words where reserved='N' order by keyword;
    Are there any keywords/entities that are neither reserved='Y' nor reserved='N'?
    Can anyone help on this issue please?
    TIA,
    Karsten

    Not sure about differences between specific versions but the easy way to get reserved words is in SQL*Plus...
    SQL> help reserved words
    RESERVED WORDS (PL/SQL)
    PL/SQL Reserved Words have special meaning in PL/SQL, and may not be used
    for identifier names (unless enclosed in "quotes").
    An asterisk (*) indicates words are also SQL Reserved Words.
    ALL*            DESC*           JAVA            PACKAGE         SUBTYPE
    ALTER*          DISTINCT*       LEVEL*          PARTITION       SUCCESSFUL*
    AND*            DO              LIKE*           PCTFREE*        SUM
    ANY*            DROP*           LIMITED         PLS_INTEGER     SYNONYM*
    ARRAY           ELSE*           LOCK*           POSITIVE        SYSDATE*
    AS*             ELSIF           LONG*           POSITIVEN       TABLE*
    ASC*            END             LOOP            PRAGMA          THEN*
    AT              EXCEPTION       MAX             PRIOR*          TIME
    AUTHID          EXCLUSIVE*      MIN             PRIVATE         TIMESTAMP
    AVG             EXECUTE         MINUS*          PROCEDURE       TIMEZONE_ABBR
    BEGIN           EXISTS*         MINUTE          PUBLIC*         TIMEZONE_HOUR
    BETWEEN*        EXIT            MLSLABEL*       RAISE           TIMEZONE_MINUTE
    BINARY_INTEGER  EXTENDS         MOD             RANGE           TIMEZONE_REGION
    BODY            EXTRACT         MODE*           RAW*            TO*
    BOOLEAN         FALSE           MONTH           REAL            TRIGGER*
    BULK            FETCH           NATURAL         RECORD          TRUE
    BY*             FLOAT*          NATURALN        REF             TYPE
    CHAR*           FOR*            NEW             RELEASE         UI
    CHAR_BASE       FORALL          NEXTVAL         RETURN          UNION*
    CHECK*          FROM*           NOCOPY          REVERSE         UNIQUE*
    CLOSE           FUNCTION        NOT*            ROLLBACK        UPDATE*
    CLUSTER*        GOTO            NOWAIT*         ROW*            USE
    COALESCE        GROUP*          NULL*           ROWID*          USER*
    COLLECT         HAVING*         NULLIF          ROWNUM*         VALIDATE*
    COMMENT*        HEAP            NUMBER*         ROWTYPE         VALUES*
    COMMIT          HOUR            NUMBER_BASE     SAVEPOINT       VARCHAR*
    COMPRESS*       IF              OCIROWID        SECOND          VARCHAR2*
    CONNECT*        IMMEDIATE*      OF*             SELECT*         VARIANCE
    CONSTANT        IN*             ON*             SEPERATE        VIEW*
    CREATE*         INDEX*          OPAQUE          SET*            WHEN
    CURRENT*        INDICATOR       OPEN            SHARE*          WHENEVER*
    CURRVAL         INSERT*         OPERATOR        SMALLINT*       WHERE*
    CURSOR          INTEGER*        OPTION*         SPACE           WHILE
    DATE*           INTERFACE       OR*             SQL             WITH*
    DAY             INTERSECT*      ORDER*          SQLCODE         WORK
    DECIMAL*        INTERVAL        ORGANIZATION    SQLERRM         WRITE
    DECLARE         INTO*           OTHERS          START*          YEAR
    DEFAULT*        IS*             OUT             STDDEV          ZONE
    DELETE*         ISOLATION
    RESERVED WORDS (SQL)
    SQL Reserved Words have special meaning in SQL, and may not be used for
    identifier names unless enclosed in "quotes".
    An asterisk (*) indicates words are also ANSI Reserved Words.
    Oracle prefixes implicitly generated schema object and subobject names
    with "SYS_". To avoid name resolution conflict, Oracle discourages you
    from prefixing your schema object and subobject names with "SYS_".
    ACCESS          DEFAULT*         INTEGER*        ONLINE          START
    ADD*            DELETE*          INTERSECT*      OPTION*         SUCCESSFUL
    ALL*            DESC*            INTO*           OR*             SYNONYM
    ALTER*          DISTINCT*        IS*             ORDER*          SYSDATE
    AND*            DROP*            LEVEL*          PCTFREE         TABLE*
    ANY*            ELSE*            LIKE*           PRIOR*          THEN*
    AS*             EXCLUSIVE        LOCK            PRIVILEGES*     TO*
    ASC*            EXISTS           LONG            PUBLIC*         TRIGGER
    AUDIT           FILE             MAXEXTENTS      RAW             UID
    BETWEEN*        FLOAT*           MINUS           RENAME          UNION*
    BY*             FOR*             MLSLABEL        RESOURCE        UNIQUE*
    CHAR*           FROM*            MODE            REVOKE*         UPDATE*
    CHECK*          GRANT*           MODIFY          ROW             USER*
    CLUSTER         GROUP*           NOAUDIT         ROWID           VALIDATE
    COLUMN          HAVING*          NOCOMPRESS      ROWNUM          VALUES*
    COMMENT         IDENTIFIED       NOT*            ROWS*           VARCHAR*
    COMPRESS        IMMEDIATE*       NOWAIT          SELECT*         VARCHAR2
    CONNECT*        IN*              NULL*           SESSION*        VIEW*
    CREATE*         INCREMENT        NUMBER          SET*            WHENEVER*
    CURRENT*        INDEX            OF*             SHARE           WHERE
    DATE*           INITIAL          OFFLINE         SIZE*           WITH*
    DECIMAL*        INSERT*          ON*             SMALLINT*
    SQL>If you haven't got oracle then I'm not sure where you're going to find out all the minor differences I'm afraid.

  • How Badly Do You Abuse Reserved Words in Column Names

    I have a challenge for all you DBA's out there.  Most of us agree that reserved words as column names is a bad practice but how clean is your database and some people are quit outspoken about it.  Run the following query on some of your custom, non-COTS, databases and post your top 5.  You may want to run it in Development to make sure new tables don't violate the best practice.  Often we don't think when creating column names or inherited ugly databases, but the fact is, we all have reserved word column names.
    Marcus Bacon
    SELECT   col.column_name , COUNT(1)
    FROM     all_tab_columns col, sys.v_$reserved_words rwrd
    WHERE    col.column_name = rwrd.keyword
    AND      owner NOT IN
               ( 'SYS',
                'SYSTEM',
                'MDSYS',
                'DBSNMP',
                'WMSYS',
                'XDB',
                'APPQOSSYS',
                'OPSG',
                'ORDDATA',
                'ORDSYS',
                'OUTLN' ,
                'CTXSYS',
                'OE',
                'HR',
                'TOAD')
    GROUP BY col.column_name
    ORDER BY count(1) desc,col.column_name;
    COLUMN_NAME                 
    COUNT(1)
    TO_DATE                           
    32
    NAME                              
    21
    ID                                
    14
    OWNER                              
    9
    CLASS                              
    6

    Hi,
    Interesting exercise!
    I modified your query, showing separate counts for Oracle, COTS and In-House schemas:
    WITH   got_developer  AS
        SELECT  CASE
                    WHEN  a.owner  IN ( 'APPQOSSYS'
                                      , 'CTXSYS'
                                      , 'DBSNMP', 'DMSYS'
                                      , 'HR'
                                      , 'MDSYS'
                                      , 'OE', 'OLAPSYS', 'OPSG', 'ORDDATA', 'ORDSYS', 'OUTLN'
                                      , 'SCOTT', 'SYS', 'SYSTEM'
                                      , 'TOAD', 'TSMSYS'
                                      , 'WKSYS', 'WMSYS'
                                      , 'XDB'
                                      )                THEN  'ORACLE'
                    WHEN  a.owner  IN ( 'FUBAR'
                                      )                THEN  'COTS'
                                                       ELSE  'IN_HOUSE'
                END   AS developer
        ,       r.keyword
        ,       r.reserved
        FROM    all_tab_columns        a
        JOIN    sys.v_$reserved_words  r  ON  r.keyword = a.column_name
    SELECT    keyword
    ,         reserved
    ,         SUM (CASE WHEN developer = 'IN_HOUSE' THEN 1 END)     AS in_house
    ,         SUM (CASE WHEN developer = 'COTS'     THEN 1 END)     AS cots
    ,         SUM (CASE WHEN developer = 'ORACLE'   THEN 1 END)     AS oracle
    ,         COUNT (keyword)                                       AS all_sources
    FROM      got_developer
    GROUP BY  GROUPING SETS ( (keyword, reserved)
                            , (reserved)
    ORDER BY  keyword
    ,         reserved
    Output from one database:
    KEYWORD         R   IN_HOUSE       COTS     ORACLE ALL_SOURCES
    A               N                                1           1
    ACCOUNT         N                     2                      2
    ADMIN           N                                3           3
    ADMINISTRATOR   N          3                                 3
    ADVISE          N                     2                      2
    ALIAS           N                     2                      2
    ALWAYS          N                                3           3
    ATTRIBUTE       N          8                    34          42
    ATTRIBUTES      N                               11          11
    AUTHENTICATION  N                                3           3
    AUTHID          N                                3           3
    BIGFILE         N                                4           4
    VALUE           N          8          3        173         184
    VERSION         N          1          2        124         127
    WAIT            N                                2           2
    WHEN            N                                1           1
    WHERE           Y                                2           2
    WRITE           N                                1           1
    XID             N                               20          20
    XMLSCHEMA       N                               15          15
    YEAR            N         21          1                     22
    ZONE            N          2         30                     32
                    N        479        182       4253        4914
                    Y                                3           3
                             479        182       4256        4917
    241 rows selected.
    Over 85% of the cases (including all 3 of the reserved words (1 ORDER and 2 WHEREs) were in Oracle-supplied schemas.
    The most commonly used keywords, outside of Oracle schemas, were
    ID (used in 206 tables)
    NAME (80)
    PERCENT (38)
    ZONE (32)
    YEAR (22)
    TIMESTAMP (18)
    USAGE (17)
    COST (15)
    CLASS (12)
    STATEMENT_ID (12)
    LOCATION, which was one of your most common examples, only occured 4 times in this database, and OWNER not at all  (outside of Oracle schemas).

  • Rman dupicate db skip tablespace not working reserved words with quoates

    This is how the script looks like
    set newname for datafile '/oracle/oracle10.2/oradata/smalldb/users01.dbf' to '/oracle/staging/TEST1/users01.dbf';
    set newname for datafile '/oracle/oracle10.2/oradata/smalldb/system01.dbf' to '/oracle/staging/TEST1/system01.dbf';
    set newname for datafile '/oracle/oracle10.2/oradata/smalldb/sysaux01.dbf' to '/oracle/staging/TEST1/sysaux01.dbf';
    set newname for datafile '/oracle/oracle10.2/oradata/smalldb/undotbs01.dbf' to '/oracle/staging/TEST1/undotbs01.dbf';
    duplicate target database to TEST123
    SKIP TABLESPACE 'USERS2', 'USERS3', 'CATALOG'
    PFILE= '/oracle/staging/test123init.ora'
    LOGFILE
    '/oracle/staging/TEST1/redo01.log' SIZE 4096K reuse,
    '/oracle/staging/TEST1/redo02.log' SIZE 4096K reuse,
    '/oracle/staging/TEST1/redo03.log' SIZE 4096K reuse;
    contents of Memory Script:
    set until scn 12748962;
    set newname for datafile 1 to
    "/oracle/staging/TEST1/system01.dbf";
    set newname for datafile 2 to
    "/oracle/staging/TEST1/undotbs01.dbf";
    set newname for datafile 3 to
    "/oracle/staging/TEST1/sysaux01.dbf";
    set newname for datafile 4 to
    "/oracle/staging/TEST1/users01.dbf";
    restore
    check readonly
    clone database
    skip tablespace USERS3,
    USERS2,
    CATALOG ;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00601: fatal error in recovery manager
    RMAN-03012: fatal error during compilation of command
    RMAN-03028: fatal error code for command Duplicate Db : 600
    RMAN-00600: internal error, arguments [8049] [] [] [] []
    **RMAN-01009: syntax error: found "catalog": expecting one of: "double-quoted-string, identifier, single-quoted-string"**
    RMAN-01007: at line 16 column 2 file: Memory Script
    I tried single quote and double quote but it did not work.
    Any idea what is going wrong here ?
    -Rohit

    What oracle version? Check the DB alert log files for information about the internal error. Other thing is RMAN may be getting confused with the 'CATALOG' tablespace with it being a reserved word in RMAN in generating the internal script - may be a bug.
    See in the internal script:
    skip tablespace USERS3,
    USERS2,
    CATALOG ;The internal script gets an error once it reaches CATALOG even though you've quoted it in the original script. For example:
    RMAN> list copy of tablespace CATALOG;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "catalog": expecting one of: "double-quoted-string, identifier, single-quoted-string"
    RMAN-01007: at line 1 column 25 file: standard inputwhereas with quotes should work (untested).
    Edited by: Stellios on Oct 14, 2009 11:37 AM

  • ORA-22806: not an object or REF on the reserved word FROM, how to debug?

    I am honestly confused on this one...
    When I run the following in sqlplus:
    SQL> SELECT a.fname, a.lname
    FROM h_user_m a
    WHERE a.id IN
    (SELECT UNIQUE m.user_id
    FROM h_user_role m
    WHERE m.role_id =
    (SELECT UNIQUE id
    FROM h_role_n
    WHERE LOWER (name) = 'wc-ismp-admin')
    OR m.role_id =
    (SELECT UNIQUE id
    FROM h_role_n
    WHERE LOWER (name) = 'wc-ismp-user'))
    AND a.id NOT IN (SELECT user_id
    FROM ip_user);
    ERROR at line 2:
    ORA-22806: not an object or REF
    I run the same query in Toad for Oracle v9.7.2.5 and it returns the same error, but highlights the reserved word FROM. I googled the error, but I'm not for sure why the reserved word FROM would be causing the error?

    Thank you for the quick response.
    I tried your query and I still receive the same 'ORA-22806: not an object or REF' error & in Toad, it does highlight the reserved word FROM.
    Oddly enough, I went back and ran the first sub-query from both of our SQL statements and no errors returned.
    Only when I added the sub-query back to the main query I receive the error as mentioned.
    So, the following worked:
    select m.user_id
    from h_user_role m
    where m.role_id in
    (select id
    from h_role_n
    where lower (name) = 'wc-ismp-admin'
    or lower (name) = 'wc-ismp-user'
    minus
    select user_id
    from ip_user)
    but added back to:
    select a.fname, a.lname
    from h_user_m a
    where a.id in(...)
    The error returns - the same steps apply to my statement as well...
    Looking at the 10g Release 2 (10.2) documents, I don't see any restrictions to the IN reserved word, in terms of number of sub-queries, etc...

  • Need a procedure to check reserve words are in uppercase or not?

    Hi All,
    i am using oracle 11g,
    my question is  i wanted to create procudure and i  am passing a sql query as input parameter  and there i am using lots of oracle reserve keywords. but i need to check if  those reserve keywords are  not in uppercase
    it should show error message and error line.  suppose my query is like below and it should show which line error is?
    SELECT FINDING_LEVEL_ID 
    ,PROTOCOL_SETUP_ID
    ,FLV_LAST_MODIFIED_BY
    ,FLV_LAST_MODIFIED_ON
      FROM empb
    Where EXISTS (SELECT 1
              FROM dept  a
             Where a.PROTOCOL_SETUP_ID = b.PROTOCOL_SETUP_ID
               AND PROTOCOL_LAST_MODIFIED_ON >
                   to_date(ms_sra_get_max_date_fnc('N'
                                                  ,'SGMGBI')
                          ,'DD-MON-YYYY HH24:MI:SS'));
    suppose error is there in where key word  so it should show errorline and error message, but error message is common for every line.
    please help me
    Thanks
    Damby

    913349 wrote:
    Hello Ramin,
    but i need as dyanamic,i cant write always select exist from dual or select 'select' where  from dual .
    anyway i need to pass as parameter.
    Thanks
    Damby
    I don't read other posts , I gave you only example... If you have table  with this words you should replace RS to your table name. And write pl/sql code for procedure.
    with rs(a) as
    select 'WHERE' FROM DUAL UNION ALL
    select 'FROM' FROM DUAL UNION ALL
    select 'EXISTS' FROM DUAL UNION ALL
    select 'SELECT' FROM DUAL
    select a.a,
           substr(s,REGEXP_instr(upper(s),a,1,column_value),length(a)) error_word,
           REGEXP_instr(upper(s),a,1,column_value) err_line
    from(
    select rownum n, q.*, rs.*, regexp_count(upper(q.s), rs.a) cnt from (    
    select
    'SELECT FINDING_LEVEL_ID,
           PROTOCOL_SETUP_ID,
           FLV_LAST_MODIFIED_BY,
           FLV_LAST_MODIFIED_ON
      froM empb
    Where exists (SELECT 1
              FROM dept a
             Where a.PROTOCOL_SETUP_ID = b.PROTOCOL_SETUP_ID
               AND PROTOCOL_LAST_MODIFIED_ON > to_date(ms_sra_get_max_date_fnc(''N'', ''SGMGBI''),''DD-MON-YYYY HH24:MI:SS''));' s
               from dual) q, RS) a, table(select collect(rownum) from dual connect by level <= a.cnt)
    where a != substr(s,REGEXP_instr(upper(s),a,1,column_value),length(a))
    A
    ERROR_WORD
    ERR_LINE
    WHERE
    Where
    121
    WHERE
    Where
    175
    FROM
    froM
    111
    EXISTS
    exists
    127
    Ramin Hashimzade

  • Search for a reserved word?

    Can I make Oracle Text do a search for a reserved word?
    I've got users searching for 'not well' and 'forget me not', and although I've trapped that and wrapped the word in braces (so the searches are passed as ...contains(searchfield,'({not}) and well')>0, for example), the results show a lot of very healthy people and holes in the ground with water in them: only the 'well' bit is being recognised, it seems.
    Similarly, 'forget me not' is being searched as 'forget and me', with the 'not' bit seemingly being ignored.
    Can I get a 'not', when the first or last word in a search, to be searched for as that word?

    NOT is a stoplist word.
    Either get rid of the stoplist entirely, or create a custom stoplist that allows NOT as a token, and you should be good to go.

  • Invoking LC webservices from VB6 where "invoke" is reserved word

    Hi everyone:
    I'm making some poceses tests on one customer (We are running a proof of concept and  positioning LC technology ) who wants to invoke LC PDF-G orchestrated services using the WS endpoint from an VB6 app.
    When the VB6 app creates the proxy object to call the invoke method  exposed by the LC orchestrated process an compilation error occurs,
    apparently invoke is a "reserved word" for internal use in VB6, so it doesn't works...
    If we try to invoke an out-of-the-box LC service from a VB6 app via the WS API all works fine!
    This is part of our code:
    SERVICE = ""
    Port = ""
    WSDL = "http://172.26.45.195:8080/soap/services/getReportTitle?WSDL"
    Set objSoap = New  MSSOAPLib30.SoapClient30
    objSoap.ClientProperty("ServerHTTPRequest") = True
    Call objSoap.MSSoapInit(WSDL,  SERVICE, Port)
    objSoap.ConnectorProperty("AuthUser") =  "administrator"
    objSoap.ConnectorProperty("AuthPassword") =  "password"
    Resultado =  objSoap.Invoke("1")
    An we attache the VB error.
    How to solve this problem...??
    Thanks in advance,
    Diego.

    That's going to be tricky because any custom LC processes has a default method of invoke.  You may be able to "reflect" it by creating a java service that lives on the LC server.  That java service can call the LC application and could be called by the VB6 app.
    On the other hand, I though Microsoft end-of-life for VB6 was back in March 2008 - so you may want to push them into using a .Net version.

Maybe you are looking for

  • Colors not displaying when viewing PDF files

    Recently I've discovered that when viewing PDF files I'm not seeing all of the colors in the charts. This is happening with PDF files that I made as recently as last year (when everything looked fine). It's also happening with files that other people

  • Exception during JDI installation

    Hello, while trying to install the JDI i'm receiving an error message for development component tc.CBS.Appl and the whole deployment aborts. I can't find any hints in the OSS so does anyone here has some suggestions? Following is a part of the SDM lo

  • TERMinal In Association WITH ITUNes** Where Are The Answers CAPTAIN CORK&&&

    PLEASE HELP CAP Im wondering if anyone can help me. I recently got a reply to a post that I wrote about deleting duplicated files. Mainly MP3s. I have not done this method yet though. Does it work? I have around 9000 mp3s that Itunes seems to always

  • Scrolling banner refresh screen

    Hi, I’m trying to create a scrolling banner, therefore on my JSF page I’ve added an outputText and it’s value is based on a backing bean that has the session scope, upon instantiation of the backing bean class I’m creating a timer that will trim the

  • Active window dimensions???

    All of my images open way too small in the Photoshop active work window.  (CS6)  Is there a way to reduce the overall size of the active window?