Getting an error while selecting from table having CLOB column.

Hi All,
I have below table created in My oracle database version Oracle Database 11g Enterprise Edition Release 11.2.0.1.0.
CREATE TABLE my_clob -- Dummy table created
(DataBody CLOB);
Current Database Character set - WE8MSWIN1250.
On the front end of my application, I have one form through which I can save/edit data in the above table. If I'm creating one new entry in the above table then it first check with existing record to avoid the duplicate entry and the this point application create the below select statement on the above table and return the error "ORA-00932: inconsistent data types: expected - got CLOB".
I can not change the sql statement.
SELECT * FROM my_clob WHERE databody IS NULL OR databody ='';
Even when I run the same statement on my DB server I’m getting the same error. Shown below
SQL> SELECT * FROM my_clob WHERE databody IS NULL OR databody ='';
SELECT * FROM my_clob WHERE databody IS NULL OR databody =''
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected - got CLOB
SQL>
Is there anything with OraOLEDB which causing this error? Please help me out to get rid of this error.
Thanks,
Santosh

You cannot compare directly a CLOB column with a VARCHAR2 column. In your case you don't need to do such comparison because Oracle consider zero length strings as null values:
SQL> create table my_clob(data int, databody clob);
Table created.
SQL> insert into my_clob values(1, null);
1 row created.
SQL> insert into my_clob values(2, '');
1 row created.
SQL> commit;
Commit complete.
SQL> select * from my_clob where databody is null;
      DATA
DATABODY
         1
         2About null values in Oracle, please read http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements005.htm#SQLRF30037.

Similar Messages

  • Select from table containing clob

    If i try to select from table containing clob column in SQL PLus it gives error.
    Tab1 contains 3 clob columns and 1 blob column
    select * from tab 1;
    SP2-0678: Column or attribute type can not be displayed by SQL*Plus
    The same statement works in SQL Developer and I am able to see the result.
    Actually i am writing the queries and they will be used by Java developers in their JSP page.
    So what happens here? Can Java use these select statements or will it throw error like SQL Plus?

    BLOB column content can't be displayed in SQL*Plus:
    SQL> create table t_blob (b blob);
    Table created.
    SQL> edit
    Wrote file afiedt.buf
      1* insert into t_blob values('01')
    SQL> /
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from t_blob;
    SP2-0678: Column or attribute type can not be displayed by SQL*PlusBlob and clob columns content can be processed using DBMS_LOB
    package procedures and functions or using client's language (like Java)
    methods. See JDBC specification.
    Rgds.

  • Error while selecting  from nested table in PL/SQL block ............

    SQL> create type string_table is table of varchar(100);
    2 /
    Type created.
    declare
    v_names string_table := string_table();
    begin
    v_names.EXTEND(3);
    v_names(1) := 'name1';
    v_names(2) := 'name2';
    v_names(3) := 'name3';
    dbms_output.put_line(v_names(1));
    dbms_output.put_line(v_names(2));
    dbms_output.put_line(v_names(3));
    dbms_output.put_line(v_names.COUNT());
    select * from table(v_names);
    end;
    select * from table(v_names);
    ERROR at line 12:
    ORA-06550: line 12, column 7:
    PLS-00428: an INTO clause is expected in this SELECT statement

    select * from table(v_names);
    I guess ,here you were trying to put the content of the NT into another NT, or just trying to print it.
    But, I don't think INTO Clause is mandatory here.
    Please check your modified code (w/o INTO) and the output :
    DECLARE
       TYPE string_table IS TABLE OF VARCHAR (100);
       v_names   string_table := string_table ();
       v_test    string_table := string_table ();
    BEGIN
       v_names.EXTEND (3);
       v_names (1) := 'name1';
       v_names (2) := 'name2';
       v_names (3) := 'name3';
       DBMS_OUTPUT.put_line ('Old collection - '||v_names (1));
       DBMS_OUTPUT.put_line ('Old collection - '||v_names (2));
       DBMS_OUTPUT.put_line ('Old collection - '||v_names (3));
       DBMS_OUTPUT.put_line ('Old collection - '||v_names.COUNT ());
       DBMS_OUTPUT.put_line (CHR(10));
       /* SELECT * FROM TABLE (v_names); */
       v_test := v_names;
       DBMS_OUTPUT.put_line ('New collection -- '||v_test (1));
       DBMS_OUTPUT.put_line ('New collection -- '||v_test (2));
       DBMS_OUTPUT.put_line ('New collection -- '||v_test (3));
       DBMS_OUTPUT.put_line ('New collection -- '||v_test.COUNT ());
       DBMS_OUTPUT.put_line (CHR(10));
       /* Printing using FOR LOOP */
       FOR i IN v_test.FIRST..v_test.LAST
       LOOP
         DBMS_OUTPUT.put_line ('In FOR Loop --- '||v_test (i));
       END LOOP;
    EXCEPTION
       WHEN OTHERS
       THEN
          DBMS_OUTPUT.put_line ('Error ' ||SQLERRM|| DBMS_UTILITY.format_error_backtrace);
    END;gives o/p :
    Old collection - name1
    Old collection - name2
    Old collection - name3
    Old collection - 3
    New collection -- name1
    New collection -- name2
    New collection -- name3
    New collection -- 3
    In FOR Loop --- name1
    In FOR Loop --- name2
    In FOR Loop --- name3Refer this link -- http://docs.oracle.com/cd/E11882_01/appdev.112/e17126/tuning.htm#CIHGGBGF
    Edited by: ranit B on Dec 26, 2012 2:29 PM
    -- code modified
    Edited by: ranit B on Dec 26, 2012 2:45 PM
    -- code 'again' updated -- FOR LOOP added

  • Getting javascript error while selecting the Recipients in OBIEE delivers.

    Hi All,
    I am working on OBIEE from quite a long time, but recently I came across a error while selecting the Recipients in Recipients list of OBIEE delivers.
    Making it more comprehensive, when I try to create an ibot , after entering all necessary information when I select Recipients in Recipients list and click on ok. I get a JavaScript error "null" is null or an object. The surprising thing is when i select cancel it works as ok.
    Any help will be highly appreciated
    Thanks,
    Jyoti
    Message was edited by:
    user616430

    I think you dont have a field named /BIC/XXXXXX in the table from which you are trying to fetch the data. Chech the spelling of the field name and table name.

  • Error while selecting from view that references external table

    Can someone explain why the error near the bottom of the code below is occuring? If USER1 grants SELECT on the external table to USER2, then USER2 can select from the view without any problems; however, I want to avoid giving USER2 access to all of the columns in the external table. (I only want to give USER2 access to two of the four columns.)
    SQL> CONNECT sys AS SYSDBA
    Connected as SYS@ as sysdba
    SQL> CREATE USER user1 IDENTIFIED BY user1
    User created.
    SQL> CREATE USER user2 IDENTIFIED BY user2
    User created.
    SQL> GRANT CONNECT, CREATE TABLE, CREATE VIEW TO user1
    Grant complete.
    SQL> GRANT CONNECT TO user2
    Grant complete.
    SQL> GRANT READ, WRITE ON DIRECTORY EXT_DATA_DIR TO user1, user2
    Grant complete.
    SQL> CONNECT user1/user1
    Connected as USER1@
    SQL> CREATE TABLE emp_xt
      emp_id     NUMBER,
      first_name VARCHAR2(30),
      last_name  VARCHAR2(30),
      phone      VARCHAR2(15)
    ORGANIZATION EXTERNAL
      TYPE ORACLE_LOADER
      DEFAULT DIRECTORY EXT_DATA_DIR
      ACCESS PARAMETERS
        RECORDS DELIMITED BY NEWLINE
        FIELDS TERMINATED BY ','
        OPTIONALLY ENCLOSED BY '"'           
      LOCATION ('emp.txt')
    REJECT LIMIT 0
    Table created.
    SQL> SELECT COUNT(1) FROM emp_xt
      COUNT(1)
             4
    1 row selected.
    SQL> CREATE OR REPLACE VIEW emp_xt_view AS SELECT first_name, last_name FROM emp_xt;
    View created.
    SQL> SELECT COUNT(1) FROM emp_xt_view
      COUNT(1)
             4
    1 row selected.
    SQL> GRANT SELECT ON emp_xt_view TO user2
    Grant complete.
    SQL> CONNECT user2/user2
    Connected as USER2@
    SQL> SELECT COUNT(1) from user1.emp_xt_view
    SELECT COUNT(1) from user1.emp_xt_view
    Error at line 0
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    ORA-04043: object "USER1"."EMP_XT" does not exist
    SQL> CONNECT user1/user1
    Connected as USER1@
    SQL> GRANT SELECT ON user1.emp_xt TO user2
    Grant complete.
    SQL> CONNECT user2/user2
    Connected as USER2@
    SQL> SELECT COUNT(1) from user1.emp_xt_view
      COUNT(1)
             4
    1 row selected.
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    user503699 wrote:
    user1983440 wrote:
    Can someone explain why the error near the bottom of the code below is occuring? If USER1 grants SELECT on the external table to USER2, then USER2 can select from the view without any problems; however, I want to avoid giving USER2 access to all of the columns in the external table. (I only want to give USER2 access to two of the four columns.)As you have demonstrated, I guess the view approach only works for database tables. External tables are actually files on the file system. Even through OS, it is not possible to grant READ/WRITE access to only part of the file. The access is for entire file. An "External Table" is just a "wrapper" provided by oracle (using data cartridge) to allow user to be able to access the file as a "table". So it can definitely not do something that underlying OS can not do.
    p.s. In fact, oracle does not even allow to edit data in external tables using SQL.Why not just make a second external table (only including the 2 columns you need) and grant select directly on that to the user. I know you say "views only" but there's an exception to every rule ... just because it's called a table doesn't make it so. You could argue an external table is nothing more than a fancy view.
    Worst case, make a view on top of the second external table.
    CREATE TABLE emp_xt_less_information
      first_name VARCHAR2(30),
      last_name  VARCHAR2(30)
    ORGANIZATION EXTERNAL
      TYPE ORACLE_LOADER
      DEFAULT DIRECTORY EXT_DATA_DIR
      ACCESS PARAMETERS
        RECORDS DELIMITED BY NEWLINE
        FIELDS TERMINATED BY ','
        OPTIONALLY ENCLOSED BY '"'   
             emp_id      number,
             first_name  char,
             last_name   char,
             phone       char
      LOCATION ('emp.txt')
    REJECT LIMIT 0
    {code}
    Should do it, but my syntax may be off a touch ....                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Error: while Selecting External table

    Hi everybody,
    When i Select an external table i am getting this error. The file is like this:
    229|1|506460|SIGROUP |4890|100|0|0|10:31:01|2007/12/17|M009|20191395001|L|B|12|CLIENT|INE547A01012|10:31:00|
    229|1|506460|SIGROUP |4900|900|0|0|10:31:01|2007/12/17|M009|20191395001|L|B|13|CLIENT|INE547A01012|10:31:00|
    229|1|500407|SWARAJENG |21400|300|0|0|10:33:28|2007/12/17|OWN|20191397001|L|B|154|OWN|INE277A01016|10:33:28|
    I had created the Table like this:
    SQL> CREATE TABLE TEMP_SAUDA
    2 (S_A VARCHAR2(20),
    3 S_TYPE VARCHAR2(20),
    4 S_CO VARCHAR2(20),
    5 S_CONAME VARCHAR2(40),
    6 S_RATE NUMBER,
    7 S_QTY NUMBER,
    8 S_G NUMBER,
    9 S_H NUMBER,
    10 S_TIME TIMESTAMP WITH TIME ZONE,
    11 S_DATE DATE,
    12 S_PCODE VARCHAR2(20),
    13 S_SETNO VARCHAR2(20),
    14 S_M VARCHAR2(20),
    15 S_N VARCHAR2(20),
    16 S_O VARCHAR2(20),
    17 S_CLIENTOWN VARCHAR2(10),
    18 S_ISIN VARCHAR2(12),
    19 S_ORDER_TIME TIMESTAMP WITH TIME ZONE
    20 )
    21 ORGANIZATION EXTERNAL
    22 (TYPE oracle_loader
    23 DEFAULT DIRECTORY BSE17122007
    24 ACCESS PARAMETERS
    25 (RECORDS DELIMITED BY NEWLINE
    26 FIELDS
    27 (
    28 S_A CHAR(20),
    29 S_TYPE CHAR(20),
    30 S_CO CHAR(20),
    31 S_CONAME CHAR(20),
    32 S_RATE CHAR(20),
    33 S_QTY CHAR(20),
    34 S_G CHAR(20),
    35 S_H CHAR(20),
    36 S_TIME CHAR(35) date_format TIMESTAMP WITH TIMEZONE mask "DD-MON-RR HH.MI.SSXFF AM TZH:TZM
    37 S_DATE CHAR(22) date_format DATE mask "mm/dd/yyyy hh:mi:ss ",
    38 S_PCODE CHAR(20),
    39 S_SETNO CHAR(20),
    40 S_M CHAR(20),
    41 S_N CHAR(20),
    42 S_O CHAR(20),
    43 S_CLIENTOWN CHAR(20),
    44 S_ISIN CHAR(20),
    45 S_ORDER_TIME date_format TIMESTAMP WITH TIMEZONE mask "DD-MON-RR HH.MI.SSXFF AM TZH:TZM"
    46 )
    47 )
    48 location (BSE17122007:'BR171207.DAT')
    49 )
    50 ;
    Table created.
    SQL> SELECT * FROM TEMP_SAUDA;
    SELECT * FROM TEMP_SAUDA
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-00554: error encountered while parsing access parameters
    KUP-01005: syntax error: found "date_format": expecting one of: "binary_double,
    binary_float, comma, char, date, defaultif, decimal, double, float, integer, (,
    nullif, oracle_date, oracle_number, position, raw, recnum, ), unsigned,
    varrawc, varchar, varraw, varcharc, zoned"
    KUP-01007: at line 21 column 14
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    Is there any mistake in this table creation.
    what i have to declare to the time format if the format in the file id hh:mm:ss
    Thank u...!
    Ravi

    The output you posted is completely wrong, I could not even create the table without errors.
    Try with this.
    CREATE TABLE TEMP_SAUDA
    (S_A VARCHAR2(20),
    S_TYPE VARCHAR2(20),
    S_CO VARCHAR2(20),
    S_CONAME VARCHAR2(40),
    S_RATE NUMBER,
    S_QTY NUMBER,
    S_G NUMBER,
    S_H NUMBER,
    S_TIME TIMESTAMP WITH TIME ZONE,
    S_DATE DATE,
    S_PCODE VARCHAR2(20),
    S_SETNO VARCHAR2(20),
    S_M VARCHAR2(20),
    S_N VARCHAR2(20),
    S_O VARCHAR2(20),
    S_CLIENTOWN VARCHAR2(10),
    S_ISIN VARCHAR2(12),
    S_ORDER_TIME TIMESTAMP WITH TIME ZONE
    ORGANIZATION EXTERNAL
    (TYPE oracle_loader
    DEFAULT DIRECTORY BSE17122007
    ACCESS PARAMETERS
    (RECORDS DELIMITED BY NEWLINE
    FIELDS terminated by "|"
    S_A CHAR(20),
    S_TYPE CHAR(20),
    S_CO CHAR(20),
    S_CONAME CHAR(20),
    S_RATE CHAR(20),
    S_QTY CHAR(20),
    S_G CHAR(20),
    S_H CHAR(20),
    S_TIME CHAR(8) date_format TIMESTAMP WITH TIMEZONE mask "HH.MI.SSXFF AM TZH:TZM",
    S_DATE CHAR(10) date_format DATE mask "yyyy/mm/dd",
    S_PCODE CHAR(20),
    S_SETNO CHAR(20),
    S_M CHAR(20),
    S_N CHAR(20),
    S_O CHAR(20),
    S_CLIENTOWN CHAR(20),
    S_ISIN CHAR(20),
    S_ORDER_TIME char(8) date_format TIMESTAMP WITH TIMEZONE mask "HH.MI.SSXFF AM TZH:TZM"
    location (BSE17122007:'BR171207.DAT')
    ;With this you get:
    SQL> col s_time format a40
    SQL> col s_date format a40
    SQL> col s_order_time format a40
    SQL> r
      1* select s_time,s_date,s_order_time from temp_sauda
    S_TIME                                   S_DATE                                   S_ORDER_TIME
    01-JAN-08 10.31.01.000000 AM +00:00      17.DEC.2007 00:00:00                     01-JAN-08 10.31.00.000000 AM +00:00
    01-JAN-08 10.31.01.000000 AM +00:00      17.DEC.2007 00:00:00                     01-JAN-08 10.31.00.000000 AM +00:00
    01-JAN-08 10.33.28.000000 AM +00:00      17.DEC.2007 00:00:00                     01-JAN-08 10.33.28.000000 AM +00:00Be aware that your file does not contain date information for the time fields, so as you see above it is defaulted to 01-JAN-08 for the S_TIME and S_ORDER_TIME column.

  • Error while selecting from a view ORA-01031: Insufficient privileges

    As DBA I have granted select privileges on a view to a user, but whenever I login as that user and try to select from the view I get the message 'ORA-01031'. When I run the query in the view as the user I do not have problem and can see the results. This view joins tables from more than one schema and does a distinct on the resultset. I am new to Oracle and would appreciate any help I can get.
    Thanks

    Back on this problem when I created another user with select permission on the same view and a default role that has reference on all the objects on the other schemas, I end up with the same error message. Although this time the schema owner of the view has select privileges on all the tables from other schemas referenced in the view.
    Thanks

  • Error while importing a table with BLOB column

    Hi,
    I am having a table with BLOB column. When I export such a table it gets exported correctly, but when I import the same in different schema having different tablespace it throws error
    IMP-00017: following statement failed with ORACLE error 959:
    "CREATE TABLE "CMM_PARTY_DOC" ("PDOC_DOC_ID" VARCHAR2(10), "PDOC_PTY_ID" VAR"
    "CHAR2(10), "PDOC_DOCDTL_ID" VARCHAR2(10), "PDOC_DOC_DESC" VARCHAR2(100), "P"
    "DOC_DOC_DTL_DESC" VARCHAR2(100), "PDOC_RCVD_YN" VARCHAR2(1), "PDOC_UPLOAD_D"
    "ATA" BLOB, "PDOC_UPD_USER" VARCHAR2(10), "PDOC_UPD_DATE" DATE, "PDOC_CRE_US"
    "ER" VARCHAR2(10) NOT NULL ENABLE, "PDOC_CRE_DATE" DATE NOT NULL ENABLE) PC"
    "TFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS"
    " 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "TS_AGIMSAPPOLOLIVE030"
    "4" LOGGING NOCOMPRESS LOB ("PDOC_UPLOAD_DATA") STORE AS (TABLESPACE "TS_AG"
    "IMSAPPOLOLIVE0304" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10 NOCACHE L"
    "OGGING STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEF"
    "AULT))"
    IMP-00003: ORACLE error 959 encountered
    ORA-00959: tablespace 'TS_AGIMSAPPOLOLIVE0304' does not exist
    I used the import command as follows :
    imp <user/pwd@conn> file=<dmpfile.dmp> fromuser=<fromuser> touser=<touser> log=<logfile.log>
    What can I do so that this table gets imported correctly?
    Also tell me "whether the BLOB is stored in different tablespace than the default tablespace of the user?"
    Thanks in advance.

    Hello,
    U can either
    1) create a tablespace with the same name in destination where you are trying to import.
    2) get the ddl of the table, modify the tablespace name to reflect the existing tablespace name in destination and run the ddl in the destination database, and run your import command with option ignore=y--> which will ignore all the create errors.
    Regards,
    Vinay

  • ORA-31061 error while creating XMLType table with virtual column

    I'm not calling it frustration ;)
    but still... what about this one :
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for 32-bit Windows: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    SQL> create table test_virtual of xmltype
      2  xmltype store as binary xml
      3  virtual columns (
      4    doc_id as (
      5      xmlcast(
      6        xmlquery('/root/@id'
      7        passing object_value returning content)
      8        as number
      9      )
    10    )
    11  )
    12  ;
    Table created.Now, on the latest version :
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for 32-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL> create table test_virtual of xmltype
      2  xmltype store as binary xml
      3  virtual columns (
      4    doc_id as (
      5      xmlcast(
      6        xmlquery('/root/@id'
      7        passing object_value returning content)
      8        as number
      9      )
    10    )
    11  )
    12  ;
          passing object_value returning content)
    ERROR at line 7:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-31061: XDB error: dbms_xdbutil_int.get_tablespace_tab
    ORA-06512: at "XDB.DBMS_XDBUTIL_INT", line 1002Is there something I should be aware of?
    Right now, I'm just evaluating the version so I can't submit any SR.
    Thanks for anyone trying to reproduce the issue.

    Just tested again on a new installation (64-bit server).
    It works :
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE     11.2.0.3.0     Production
    TNS for 64-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL>
    SQL> create table test_virtual of xmltype
      2  xmltype store as binary xml
      3  virtual columns (
      4    doc_id as (
      5      xmlcast(
      6        xmlquery('/root/@id'
      7                 passing object_value returning content)
      8        as number
      9      )
    10    )
    11  );
    Table created
    Now I'll try to see what are the differences between the two installations.
    Thanks Dan and Marco for looking into this.
    Edited by: odie_63 on 2 mai 2012 15:51

  • Export data from table with CLOB column

    DB: Oracle10g
    SQLDeveloper: 1.0
    OS: windows xp for sqldeveloper
    Linux for Oracle db
    we have a table with two CLOB columns. We want to export the data to either text or csv. But the CLOB columns don't show up in the columns that can be exported.
    How do I export CLOB data from SQL Developer?
    Regards,
    Lonneke

    I don't think this is a good protection: you can have these characters in VARCHAR anyway, and this way you "throw the baby out with the bath water". Not mentioning that right now also immune formats like HTML are also limited.

  • Error while selecting from sequence

    Hi,
    select seq_empid.nextval from dual;
    when selecting this from Java code it is giving error "table or view does not exist"..
    can anybody pls guide me as to what possible reasons could be for the error?
    thx

    are you using different user acct when using it from java? i think it migth be privilege issue.

  • Getting runtime error while using hash table

    Hi,
    I have defined an internal table as hash with unique key.But while executng the prog. its giving a dump saying "There is already a line with the same key." My code is
      data: begin of wa_rkrp,
             vbeln like vbrk-vbeln,
             fkdat like vbrk-fkdat,
             fkart like vbrk-fkart,
             kunag like vbrk-kunag,
             knumv like vbrk-knumv,
             inco1 like vbrk-inco1,
             spart like vbrk-spart,
             netwr like vbrk-netwr,
             mwsbk like vbrk-mwsbk,
             uepos like vbrp-uepos,
             werks like vbrp-werks,
             lgort like vbrp-lgort,
            end of wa_rkrp.
      data lt_rkrp like hashed table of wa_rkrp
               with unique key vbeln
               with header line.
      select vbrk~vbeln
             vbrk~fkdat
             vbrk~fkart
             vbrk~kunag
             vbrk~knumv
             vbrk~inco1
             vbrk~spart
             vbrk~netwr
             vbrk~mwsbk
             vbrp~uepos
             vbrp~werks
             vbrp~lgort
             into table lt_rkrp
             from vbrk inner join vbrp
              on  vbrpvbeln = vbrkvbeln
             where vbrk~fkdat in s_fkdat
               and vbrk~bukrs eq p_bukrs.
    Any problem in my select query? or with my table deifnition.
    Can anyone pls suggest how to rectify this.

    define a unique key VBELN and POSNR.
    data lt_rkrp like hashed table of wa_rkrp
    with unique key vbeln posnr
    with header line.
    BTW: Stop using the header line!!! Outdated!!
    Edited by: Micky Oestreich on Mar 23, 2009 7:28 AM

  • Getting an error while using if statement in calculated column.can anyone please help me with this issue

    I am trying to learn HANA on my own.i have product id,product name,delivery date and Grossamount in my calculated view.i am trying to create calculated column where i need Grossamount in two columns based on delivery date.I have 2012 and 2013 as values for my delivery date.so i have created two column as grossamount_2012 and grossamount_2013.if i have delivery date as 4thdec,2012 i want the grossamount value to be in coloumn grossamount_2012 and the grossamount_2013 should be blank.i have written an expression like this
    if("Deliverydate" <= longdate(2012-12-04),"Grossamount","0")
    and it looks like this is wrong.i am getting the text Grossamount rather than values for that field in my output.so can anyone help me please?

    Hi chandra
    i am trying to get the same result by using sql script and CE functions.i have written the following code
    select A."PRODUCTID",
           E."TEXT" as "PRODUCTNAME",
           C."COUNTRY",
           D."DELIVERYDATE",
           Sum(D."GROSSAMOUNT") as "GROSSAMOUNT"
           from "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MasterData.Products" as A     
           inner join "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MasterData.BusinessPartner" as B
           on A."SUPPLIERID" = B."PARTNERID"      
           inner join "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MasterData.Addresses" as C
           on B."ADDRESSID" = C."ADDRESSID"
           inner join "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Purchase.Item" as D
           on A."PRODUCTID" = D."PRODUCTID"
           inner join "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Util.Texts" as E
           on A."NAMEID" = E."TEXTID"
           GROUP BY A."PRODUCTID",E."TEXT",C."COUNTRY",D."DELIVERYDATE"; 
    this is working fine but i want to split the grossamount based on current year and last year.Any idea how to do this
    In calculation view using script can we use if and case statements?

  • SDM Error while deploying from IDE

    Hi I am getting an error while deploying from IDE.
    -- Server XXX did not accept login request as admin on port 50018.Details: ERROR: Could not establish connection to server XXX at port 50018: XXX
    This problem has been discussed herein SDN earlier.I also checked in the SDM trouble shooting guide and accordingly have added a entry in the host file under sys32/drivers, but still I continue to get that error.Any pointers will be appreciated.
    Regards,
    Muinul

    Hi
      Have you ever been able to deploy into SDM. What is the password that you type. Try typing SDM and see. If that doesnt work then you will have to change the password of your SDM. Your password either has been corrupted or changed
    Anyway follow these steps
    1. Start the Config Tool.
               (Execute <SAPj2eeEngine_install_dir> \configtool\configtool.bat.)
    1. Select the secure store node.
                The configuration for the secure storage in the file system appears.
    1. Select the admin/password/<SID> entry.
    2. Enter the administrator user's new password in the "Value" field and choose "Add".
    3. Choose "File" --> "Apply" to save the data.
    Note: Contrary to the message that appears, you do not need to restart the server or cluster for this change to take effect.
    4. Finally restart SDM server.
    Hope that helps. Let me know if you require more information
    regards
    Ravi

  • Error while filling setup tables for 2lis_13_vahdr

    Dear friends,
    I am getting below Error while filling setup tables for 2lis_13_vahdr.
    More faulty documents found than the tolerated 0000000000
    Message no. M2222
    Can any one guide me how to address this issue.
    Thanks and Regards
    Nithya

    Hello Nithya,
    It seems the No of tolerated faulty documents that you have given is 0. So when you initialize try to these.
    While executing OLI*BW including a value in the maintain  "No. tolerated faulty documents" - 5000 or 10000.
    Then execute the program in background.
    Once the job is completed check the background job log if any errors.
    Thanks
    Chandran

Maybe you are looking for

  • [SOLVED]Make Pacman think that I have libgl (NVIDIA driver)

    Hi, I've installed my Nvidia driver manualy because my card (NVS 310) do not work with the packages provides by pacman (even in AUR). Now I have a problem because pacman think I do not have libgl and do not allows me to install any graphical tools li

  • My "second" Mac

    Hi! I have a desktop "iMac" and a "macbook". I use the same user ID. I installed after purchasing 'Facetime" on my macbook. But, I can't buy and install the same on my iMac. If, I don't want to change my Apple ID, (I think it must be the issue) how c

  • Query on BE, Tcode and GL accounts

    Hi Friends 1. surrogate bidding and proxy bidding: Are these performed by both BE and LAC.Is proxy bidding done by LAC only. 2.Tcode for GUI of CCM and SUS 3.Which version of srm supports multiple g/l accounts Regards Simha

  • Tool Palette Submenus Slow to Display

    I click and hold on a tool in  Photoshop CS 6 on the Mac and it takes 2-3 seconds for the submenu to display. All my mouse settings are towards the fast end. Illustrator CS6 displays them much quicker and previous versions of PS weren't this slow to

  • Simple Interactive PDF not working

    Once again I'm stumped. I'm attampting to create a simple slide show which animates from one image to the next with just a previous and next button. The project seems to work fine when using the preview mode within InDesign CS6 (8.0.1), but when I ex