Problem in insert

Hi All,
I have a query mentioned below.
I am taking values from XML for some fields.The problem is while inserting some of the columns(XML) are null and only the last column(XML) has values. But when I execute the select statement alone, all the columns(XML) has values.
I created another table with just three columns and tried to insert values from XML all the fields are having values.
Kindly suggest me on this issue.
Structure of the table
IB_BR_ID NUMBER(20)
IB_BR_MITTENTE VARCHAR2(50)
IB_BR_RICEVENTE VARCHAR2(50)
IB_BR_IMPORTO VARCHAR2(25)
IB_BR_DATA_VALUTA DATE
IB_BR_DATA_VALUTA_D DATE
IB_BR_DATA_REGIME DATE
IB_BR_DATA_ORDINE DATE
IB_BR_DATA_CONTABILE DATE
IB_BR_CRO VARCHAR2(20)
IB_BR_O_ANAG VARCHAR2(50)
IB_BR_O_COD VARCHAR2(30)
IB_BR_D_ANAG VARCHAR2(50)
IB_BR_D_COD VARCHAR2(30)
IB_BR_D_IND VARCHAR2(4000)
IB_BR_D_LOC VARCHAR2(35)
IB_BR_CAUSALE VARCHAR2(50)
IB_BR_DIVISA VARCHAR2(5)
IB_BR_CAUSALE_SIA VARCHAR2(20)
INSERT INTO /*+ append */ IBG_MA_BONIFICI_RETE (
               IB_BR_MITTENTE,           --1
               IB_BR_RICEVENTE,           --2
               IB_BR_IMPORTO,               --3
               IB_BR_DATA_VALUTA,          --4
               IB_BR_DATA_VALUTA_D,     --5
               IB_BR_DATA_REGIME,           6
               IB_BR_DATA_ORDINE,          --7
               IB_BR_DATA_CONTABILE,     --8
               IB_BR_CRO,               --9
               IB_BR_O_ANAG,               --10
               IB_BR_O_COD,                --11
               IB_BR_D_ANAG,                --12
               IB_BR_D_COD,               --13
               IB_BR_D_IND,                --14
               IB_BR_D_LOC,                --15
               IB_BR_CAUSALE,                --16
               IB_BR_DIVISA,                --17
               IB_BR_CAUSALE_SIA          --18
          SELECT DS_ABI_BANCA_PROP,
                    DS_ABI_BANCA_DESTINATARIA,
                    LTRIM( TO_CHAR(DS_IMPORTO, '9999999999999999990D90', 'NLS_NUMERIC_CHARACTERS='',.''')) || '/C' as x,
                    TRUNC(DS_DATA_VALUTA_ADDEBITO) as y,
                    TRUNC(DS_DATA_VALUTA_BENEF_CLIENTE) as z,
                    --NULL,                         
                    TRUNC(DS_DATA_ESECUZIONE) as xx,     
                    TRUNC(DS_DATA_INIZIO_STATO) as yy,
          SUBSTR(DS_RIF_UNIVOCO,1,20) as one,
                    SUBSTR(XMLTYPE(DS_DETTAGLI_XML).EXTRACT('/DISPOSIZIONE_PC_DETAILS/@DENOMINAZIONE_ORDINANTE').getStringVal(),1,50) as two,
     SUBSTR(XMLTYPE(DS_DETTAGLI_XML).EXTRACT('/DISPOSIZIONE_PC_DETAILS/@CODICE_FISCALE_ORDINANTE').getStringVal(),1,30) as three,
     SUBSTR(XMLTYPE(DS_DETTAGLI_XML).EXTRACT('/DISPOSIZIONE_PC_DETAILS/@DESCRIZIONE_DESTINATARIO').getStringVal(),1,50) as four,
SUBSTR(DS_CONTO_DESTINATARIO, 5, 8) as five, --13
          SUBSTR(to_char(XMLTYPE(DS_DETTAGLI_XML).EXTRACT('/DISPOSIZIONE_PC_DETAILS/@INDIRIZZO_DESTINATARIO').getStringVal()),1,20) as six,
     SUBSTR(DS_LOCALITA_BENEF,1,35) as seven, --15
     SUBSTR(XMLTYPE(DS_DETTAGLI_XML).EXTRACT('/DISPOSIZIONE_PC_DETAILS/@DESCRIZIONE_RIFERIMENTO_OPERAZIONE').getStringVal(),1,50),
                    DS_ISO_DIVISA_ADDEBITO, --17
     SUBSTR(DS_CAUSALE,1,20)
               FROM PRG_TR_DISPOSIZIONE
               WHERE DS_ABI_BANCA_PROP = '03268'
               AND DS_STATO = 'ESAUR'
               AND DS_TIPO_INTERNO IN ('BSI','BAII')
               AND TRUNC(DS_data_inizio_stato) between trunc(to_date('01-01-2006','dd/mm/yyyy'))
and trunc(to_date('02-01-2006','dd/mm/yyyy')) and rownum < 2;
Thanks in advance,
Jaggy

Hi,
Sorry, if my posting is not clear.
I need to insert only one row. So I used rownum to restrict.
My question is I am executing a query, say which is having 8 columns. When I execute the select statement I can see the values for all the columns. But when I tried to use insert into .. 0select statement, only some of the columns has values and remaining columns are null. This happens only for those columns for whcih I populate value from XMLTYPE.
Out of 8 columns 5 columns are being populated from XML. Say a,b,c,d,e are those columns except e other columns are loaded as null. I am sure that all the columns has got value.
I hope You understand my Question now.
Thank You
Jaggy

Similar Messages

  • Problem in inserting data into MySQL table

    Hi All,
    I have a table with just two fields FIRSTNAME and SECONDNAME in MySQL. I am accepting the First Name and Second Name in two text fields and then trying to insert them into the MySQL table. I have set the concurrency of the rowset to CONCUR_UPDATABLE and am using the code clip for Database row insert with the appropriate changes. When I run the application it doesnt give me any errors but the data is also not inserted in the table. Can someone pls help me out.
    Loneliness wins the race :-)

    This is my problem when inserting single row. What does it means ?
    MusicInsert: com.mysql.jdbc.NotUpdatable: Result Set not updatable.This result set must come from a statement that was created with a result set type of ResultSet.CONCUR_UPDATABLE, the query must select only one table, and must select all primary keys from that table. See the JDBC 2.1 API Specification, section 5.6 for more details

  • Problem while inserting into a table which has ManyToOne relation

    Problem while inserting into a table *(Files)* which has ManyToOne relation with another table *(Folder)* involving a attribute both in primary key as well as in foreign key in JPA 1.0.
    Relevent Code
    Entities:
    public class Files implements Serializable {
    @EmbeddedId
    protected FilesPK filesPK;
    private String filename;
    @JoinColumns({
    @JoinColumn(name = "folder_id", referencedColumnName = "folder_id"),
    @JoinColumn(name = "uid", referencedColumnName = "uid", insertable = false, updatable = false)})
    @ManyToOne(optional = false)
    private Folders folders;
    public class FilesPK implements Serializable {
    private int fileId;
    private int uid;
    public class Folders implements Serializable {
    @EmbeddedId
    protected FoldersPK foldersPK;
    private String folderName;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "folders")
    private Collection<Files> filesCollection;
    @JoinColumn(name = "uid", referencedColumnName = "uid", insertable = false, updatable = false)
    @ManyToOne(optional = false)
    private Users users;
    public class FoldersPK implements Serializable {
    private int folderId;
    private int uid;
    public class Users implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer uid;
    private String username;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "users")
    private Collection<Folders> foldersCollection;
    I left out @Basic & @Column annotations for sake of less code.
    EJB method
    public void insertFile(String fileName, int folderID, int uid){
    FilesPK pk = new FilesPK();
    pk.setUid(uid);
    Files file = new Files();
    file.setFilename(fileName);
    file.setFilesPK(pk);
    FoldersPK folderPk = new FoldersPK(folderID, uid);
         // My understanding that it should automatically handle folderId in files table,
    // but it is not…
    file.setFolders(em.find(Folders.class, folderPk));
    em.persist(file);
    It is giving error:
    Internal Exception: java.sql.SQLException: Field 'folderid' doesn't have a default value_
    Error Code: 1364
    Call: INSERT INTO files (filename, uid, fileid) VALUES (?, ?, ?)_
    _       bind => [hello.txt, 1, 0]_
    It is not even considering folderId while inserting into db.
    However it works fine when I add folderId variable in Files entity and changed insertFile like this:
    public void insertFile(String fileName, int folderID, int uid){
    FilesPK pk = new FilesPK();
    pk.setUid(uid);
    Files file = new Files();
    file.setFilename(fileName);
    file.setFilesPK(pk);
    file.setFolderId(folderId) // added line
    FoldersPK folderPk = new FoldersPK(folderID, uid);
    file.setFolders(em.find(Folders.class, folderPk));
    em.persist(file);
    My question is that is this behavior expected or it is a bug.
    Is it required to add "column_name" variable separately even when an entity has reference to ManyToOne mapping foreign Entity ?
    I used Mysql 5.1 for database, then generate entities using toplink, JPA 1.0, glassfish v2.1.
    I've also tested this using eclipselink and got same error.
    Please provide some pointers.
    Thanks

    Hello,
    What version of EclipseLink did you try? This looks like bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=280436 that was fixed in EclipseLink 2.0, so please try a later version.
    You can also try working around the problem by making both fields writable through the reference mapping.
    Best Regards,
    Chris

  • Problem while inserting a record to infotype 416

    Iam facing a problem while inserting a record to the infotype 416 for a personnel no using the FM 'HR_INFOTYPE_OPERATION'.I have created a FM to insert a record to the infotype 416.In that FM iam using the FM 'HR_INFOTYPE_OPERATION' to create a record for infotype 416.while executing  my FM the FM 'HR_INFOTYPE_OPERATION' is returning the return value 0.But when i check in PA30 for the infotype 416,there is no record created for that personnel no.Also in the table PA0416 the record is not get created.SO what might be the problem.can anyone please provide me help on this.
    I have attached the code of my FM for ur reference.
    FUNCTION Y_ESS_FL_ENCASH.
    DATA: G_COMPENSATION_AMOUNT LIKE PA0416-AMONT,
          G_RETURN TYPE BAPIRETURN1.
    DATA T_PA0416 LIKE P0416 OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'HR_READ_INFOTYPE'
        EXPORTING
           TCLAS                 = 'A'
           PERNR                 = '00000014'
           INFTY                 = '0416'
         BEGDA                 = sy-datum
         ENDDA                 =  sy-datum
           BYPASS_BUFFER         = 'X'
         LEGACY_MODE           = ' '
    IMPORTING
         SUBRC                 =
          TABLES
            INFTY_TAB             = T_PA0416
    EXCEPTIONS
      INFTY_NOT_FOUND       = 1
      OTHERS                = 2
        LOOP AT T_PA0416
        WHERE SUBTY = '1002'.
        ENDLOOP.
        IF SY-SUBRC <> 0.
          CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
            EXPORTING
               NUMBER = '00000014'
            IMPORTING
               RETURN = G_RETURN.
          IF SY-SUBRC <> 0.
             MESSAGE I016(RP) WITH ' RECORD IS ALREADY LOCKED'.
          ENDIF.
          T_PA0416-PERNR = '00000014'.
          T_PA0416-SUBTY = '1002'.
          T_PA0416-INFTY = '0416'.
          T_PA0416-OBJPS = ''.
          T_PA0416-SPRPS = ''.
          T_PA0416-SEQNR = ''.
          T_PA0416-AEDTM = SY-DATUM.
          T_PA0416-UNAME = SY-UNAME.
          T_PA0416-ENDDA = SY-DATUM.
          T_PA0416-BEGDA = SY-DATUM.
          T_PA0416-NUMBR = '10'.
          T_PA0416-WGTYP = '1530'.
          T_PA0416-AMONT = '15000'.
          T_PA0416-WAERS = 'INR'.
          T_PA0416-QUONR = '1'.
          APPEND T_PA0416.
          CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              INFTY                  = '0416'
              NUMBER                 = '00000014'
              SUBTYPE                = '1002'
      OBJECTID               =
      LOCKINDICATOR          =
             VALIDITYEND            = '31129999'
             VALIDITYBEGIN          = SY-DATUM
            RECORDNUMBER           = ''
              RECORD                 = T_PA0416
              OPERATION              = 'INS'
              TCLAS                  = 'A'
      DIALOG_MODE            = '0'
            NOCOMMIT               = 'X'
      VIEW_IDENTIFIER        =
      SECONDARY_RECORD       =
            IMPORTING
              RETURN                 = G_RETURN.
      KEY                    =
          IF G_RETURN+0(1) EQ 'E'.
                  MESSAGE I086(ZHR) WITH 'Record is not inserted in IT416'.
          ELSE.
              COMMIT WORK.
          ENDIF.
          CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
            EXPORTING
              NUMBER = '00000014'
            IMPORTING
              RETURN = G_RETURN.
        ENDIF.
    ENDFUNCTION.

    Hi Murthy
    With a first glance, I think you have given a wrong parameter value to "validityend". It should be '99991231' not '31129999' .
    If your problem still persists, try inserting the data online from PA30. If your input causes no errors, then please state what the return parameter contains.
    Regards
    *--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

  • A problem with inserting into DB hebrew strings

    Hi,
    I am working with a 8.1.7 DB version, and use thin driver.
    I have my DB Charest configured to iso 8859P8 (which is visual Hebrew)
    I have no problem in making a connection and retrieving strings, using SELECT * FROM ..
    and then use the ResultSet.getString(String columnName) method .
    I also have no problem in inserting the Hebrew characters , and retrieving them back ( I represent them in a servlet ),
    The only problem I do have, is when I try to insert into DB a row in the following manner
    INSERT into table_name values( Hebrew_String_value1, Hebrew_String_value2, Hebrew_String_value3, Hebrew_String_value4)
    the insertion works fine , but somehow the insertion misplaces the strings order and actually the insertion is in opposite order :
    Hebrew_String_value4, Hebrew_String_value3, Hebrew_String_value2, Hebrew_String_value1.
    If I use the same insert with English Strings , there is no problem.
    does any one have the solution how I insert the strings in the right order ?
    one solution I have is to insert only one column and then update the table for each column , but then , instead of one execute() action , I have to make ,
    1 execute() + 9 executeUpdate() for a 10 column table

    Can you try specify the column order in your INSERT statement, i.e.
    INSERT INTO mytable( column1_name,
                         column2_name,
                         column3_name,
                         column4_name )
                 VALUES( column1_string,
                         column2_string,
                         column3_string,
                         column4_string)My wild guess, though I can't understand why at the moment, is that there may be a problem because Hebrew is read from right to left, that may be causing a problem.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Problem on inserting text from file to a clob column

    Hi! I'm having problem in inserting text read from a text file to a clob column in my table.
    Here's my code
    public void addSyllabusOutline(int syllid)
              CLOB objclob1 = null;
              CLOB objclob2 = null;
              String query = "SELECT outline, projoutline FROM Syllabus WHERE syllabusid = '"+ syllid +"' FOR UPDATE";
              try
                   System.out.print("Getting syllabus outline and projoutline clob locator...");
                   DBConnection dbconnbean = new DBConnection();
                   dbconnbean.openConnection();
                   ResultSet rst = dbconnbean.executeQuery(query);
                   if(rst.next())
                        objclob1 = (oracle.sql.CLOB)rst.getClob("outline");
                        objclob2 = (oracle.sql.CLOB)rst.getClob("projoutline");
                        Writer clobwriter1 = ((oracle.sql.CLOB)objclob1).getCharacterOutputStream();
                        String filename1 = "c:\\o1u2t3l4i5n6e7.txt";
                        File outlinefile1 = new File(filename1);
                        FileReader outlineFileReader1 = new FileReader(outlinefile1);
                        char[] cbuffer1 = new char[10 * 1024];
                        int nread1 = 0;
                        while((nread1 = outlineFileReader1.read(cbuffer1)) != -1)
                             clobwriter1.write(cbuffer1, 0, nread1);
                        //clobwriter1.flush();
                        clobwriter1.close();
                        Writer clobwriter2 = ((oracle.sql.CLOB)objclob2).getCharacterOutputStream();
                        String filename2 = "c:\\p1r2o3j4o5u6t7l8i9n0e.txt";
                        File outlinefile2 = new File(filename2);
                        FileReader outlineFileReader2 = new FileReader(outlinefile2);
                        char[] cbuffer2 = new char[10 * 1024];
                        int nread2 = 0;
                        while((nread2 = outlineFileReader2.read(cbuffer2)) != -1)
                             clobwriter2.write(cbuffer2, 0, nread2);
                        //clobwriter2.flush();
                        clobwriter2.close();
                   System.out.println("done");
                   dbconnbean.closeConnection();
              catch(Exception e)
                   System.out.println("Error: " + e);
    My error is java.sql.SQLException fetch out of sequence. I don't have an Idea on what seems to be the problem. Please help.. Thank you very much. ^_^

    Hi,
    Print the whole stack trace. It will tell you the line which causes the error. How you use clob and blob in oracle is also version dependent. Try to google for
    oracle "your version" java clob example.
    /Kaj

  • Problem in inserting a node in Treeview.

    Hi all,
    I'm having a problem in inserting a node in the
    treeview always it appends in the end of the
    sibling.
    Basically on double clicking of any node in the
    treeview should create a copy of the double clicked
    node and just insert the copy of the doubleclicked
    node next to the doubleclicked node instead at the end of the sibling.
    if i do this it will to the end of all the siblings.
    copyObject = l_SelectedNode.Clone();
    copyObject.Parent = l_SelectedNode.Parent;
    instead of next to it.
    I am trying something like this:
    RootNode
    |
    ---CHILD Sibling Node1
    | |
    ----GrandChild1Sibling1
    | |
    ---GrandChild1Sibling2 <<-- double clicking
    (GrandChild1Sibling2)
    | |
    <<-- it must add
    (GrandChild1Sibling2_copy)
    ---GrandChild1Sibling3
    | |
    ---GrandChild1Sibling4
    | << -- But it is adding a copy here
    at the end of all sibbling..
    |
    ---CHILD Sibling Node2
    | |
    -------GrandChild2Sibling1
    | |
    ------GrandChild2Sibling2
    | |
    ------GrandChild2Sibling3
    | |
    ------GrandChild2Sibling4
    |
    i am doing GrandChild1Sibling2_copy.parent =
    GrandChild1Sibling2.Parent;
    it will always add in the end of all the sibling as
    (GrandChild1Sibling5_copy) instead of next to
    (GrandChild1Sibling3_copy) Just below the GrandChild1Sibling2.
    Is there any simple soln or any ordering factor which i should look for.
    Thanx in advance...
    Regards,
    -Prasad

    Hello,
    Check the following link.
    SQL error 1653
    Hope it helps in solving your problem.
    Thanks and Regards,
    Sachin

  • Problem in Insertion into table through After Report Parameter form trigger

    Hi All,
    I am getting problem in inserting some data into temp table through Report.
    My requirement is like that, I have to do a calculation based on user parameters, and then insert the data into the temp table. I wanted to do this into After Report Parameter form trigger function. I have done all the calculation and wrote all the insert statement in that function. There is no problem in compilation. then I am taking value from this temp table in my formula columns.
    When I run this report, it hangs, don't understand what is the problem.Can anybody help me out in this.
    Thanks,
    Nidhi

    The code is as follows:
    function AfterPForm return boolean is
    CURSOR CUR_RECEIPT(RECEIPT_NUM_FROM NUMBER, RECEIPT_NUM_TO NUMBER) IS
    SELECT DISTINCT receipt, item_no FROM xxeeg.xxeeg_1229_sp_putaway WHERE RECEIPT BETWEEN
    RECEIPT_NUM_FROM AND RECEIPT_NUM_TO ;
    V_CUR_RECEIPT CUR_RECEIPT%ROWTYPE;
    begin
    OPEN CUR_RECEIPT(:RECEIPT_NUM_FROM, :RECEIPT_NUM_TO);
    FETCH CUR_RECEIPT
    INTO V_CUR_RECEIPT;
    LOOP
    EXIT WHEN CUR_RECEIPT%NOTFOUND;
    IF V_CUR_RECEIPT.ITEM_NO = 'TEST1' AND V_CUR_RECEIPT.RECEIPT = '12' THEN
    INSERT INTO SP_TEMP
    (RECEIPT, ITEM_NO, LOCATION1)
    VALUES
    (V_CUR_RECEIPT.RECEIPT, V_CUR_RECEIPT.ITEM_NO, 10);
    UPDATE SP_TEMP
    SET LOCATION2 = 12
    WHERE RECEIPT = V_CUR_RECEIPT.RECEIPT AND ITEM_NO = V_CUR_RECEIPT.ITEM_NO;
    UPDATE SP_TEMP
    SET LOCATION3 = 13
    WHERE RECEIPT = V_CUR_RECEIPT.RECEIPT AND ITEM_NO = V_CUR_RECEIPT.ITEM_NO;
    UPDATE SP_TEMP
    SET LOCATION4 = 14
    WHERE RECEIPT = V_CUR_RECEIPT.RECEIPT AND ITEM_NO = V_CUR_RECEIPT.ITEM_NO;
    ELSE
    IF V_CUR_RECEIPT.ITEM_NO = 'TEST2' AND V_CUR_RECEIPT.RECEIPT = '12' THEN
    INSERT INTO SP_TEMP
    (RECEIPT, ITEM_NO, LOCATION1)
    VALUES
    (V_CUR_RECEIPT.RECEIPT, V_CUR_RECEIPT.ITEM_NO, 10);
    UPDATE SP_TEMP
    SET LOCATION2 = 16
    WHERE RECEIPT = V_CUR_RECEIPT.RECEIPT AND ITEM_NO = V_CUR_RECEIPT.ITEM_NO;
    UPDATE SP_TEMP
    SET LOCATION3 = 17
    WHERE RECEIPT = V_CUR_RECEIPT.RECEIPT AND ITEM_NO =V_CUR_RECEIPT.ITEM_NO;
    UPDATE SP_TEMP
    SET LOCATION4 = 18
    WHERE RECEIPT = V_CUR_RECEIPT.RECEIPT AND ITEM_NO = V_CUR_RECEIPT.ITEM_NO;
    ELSE
    INSERT INTO SP_TEMP
    (RECEIPT, ITEM_NO, LOCATION1)
    VALUES
    (V_CUR_RECEIPT.RECEIPT, V_CUR_RECEIPT.ITEM_NO, 10);
    UPDATE SP_TEMP
    SET LOCATION2 = 19
    WHERE RECEIPT = V_CUR_RECEIPT.RECEIPT AND ITEM_NO = V_CUR_RECEIPT.ITEM_NO;
    UPDATE SP_TEMP
    SET LOCATION3 = 20
    WHERE RECEIPT = V_CUR_RECEIPT.RECEIPT AND ITEM_NO =V_CUR_RECEIPT.ITEM_NO;
    UPDATE SP_TEMP
    SET LOCATION4 = 21
    WHERE RECEIPT = V_CUR_RECEIPT.RECEIPT AND ITEM_NO = V_CUR_RECEIPT.ITEM_NO;
    END IF;
    END IF;
    END LOOP;
    COMMIT;
    CLOSE CUR_RECEIPT;
    return(TRUE);
    end;
    .....................................................................................................................

  • Problem to insert  Chinese Characters(GB3212)  into MySQL

    I met a problem to insert Chinese Characters (GB3212) into MySQL using Entity Bean (or JPA).
    For example, when a hardcoded string "{color:#ff0000}&#30005;&#22120;me&#20803;&#20214;{color}" is inserted, it is displayed as "{color:#ff0000}??me??{color}" in MySQL.
    The NamedQuery is also not working for Chinese Characters.
    The setting are as following:
    GlassFish JDBC connection pool: useUnicode=true, charecterEncoding=gb2312
    NetBeans IDE: source encoding set to GB2312;
    MySql table: the column set to CHARACTER SET gb2312;
    Any experts, please give advice
    Thanks lot

    I didn't noticed that there is a {color:#ff0000}sun-resources.xml{color} file under {color:#ff0000}<ejb project>/server resources{color}.
    This file has a pool configuration. This config just overwite the paremeter i added using Admin Console every time a client is lauched. So there are two option to fix this problem.
    1. Insert the follwowing two lines into the {color:#ff0000}sun-resources.xml{color}
    <property name="characterEncoding" value="gb2312"/>
    <property name="useUnicode" value="true"/>
    2. delete the everthing in the {color:#ff0000}sun-resources.xml, using Admin Console {color}config your own pool & DataSource
    I tried first option & it works.

  • Problems with INSERT  syntax ?

    Dear programmers,
    I am have a problem with INSERT Syntax,
    I have a table with 11 fields out of which one is auto_increment field(id), Now my problem is, Do i need to specifiy autoincrement field in INSERT statement. I dont thinks ?
    My Insert statement is as follows ,
    int result = st.executeUpdate("insert into tablename"
              +"(name, user_group, lage, preis, anmerkung, exp_uri, timestamp, nummer)"
              +"values +Objekt+"','"+Kategoriekey+"','"+Lage+"','"+Preis+"','"+Anmerkung+"','"+Dateiname+"','"+date.getTime()+"','"+ObjektID+"')");
    thanks in advance
    bye

    The answer to your question is maybe. Each database handles autoincrements differently. What database are you using?
    I also noticed that you are doing an insert using the standard Statement. You should look into using PreparedStatements for performance reasons and issues such as single quotes from within a string.
    Matt

  • Problem while inserting Latin characters

    Hi All,
    Version details
    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 - ProductionLanguage :
    SQL> show parameter nls_lang
    NAME                                 TYPE        VALUE
    nls_language                         string      AMERICANCurrently,we are facing problem in inserting Latin characters such as 'ʬ '
    We are receiving these characters from another DB via DB Link .What parameters should I change in my DB to accept those Latin characters.
    Please suggest an approach or charset that'll allow my Db to accept both English and Latin characters.

    Sorry for not providing exact information.But please consider the example character that I've mentioned 'ʬ'.
    While I'm trying to insert the above character in my Db with below nls_parameters
    SQL>  select parameter||'--> '||value from nls_database_parameters;
    PARAMETER||'-->'||VALUE
    NLS_LANGUAGE--> AMERICAN
    NLS_TERRITORY--> AMERICA
    NLS_CURRENCY--> $
    NLS_ISO_CURRENCY--> AMERICA
    NLS_NUMERIC_CHARACTERS--> .,
    NLS_CHARACTERSET--> UTF8
    NLS_CALENDAR--> GREGORIAN
    NLS_DATE_FORMAT--> DD-MON-RR
    NLS_DATE_LANGUAGE--> AMERICAN
    NLS_SORT--> BINARY
    NLS_TIME_FORMAT--> HH.MI.SSXFF AM
    PARAMETER||'-->'||VALUE
    NLS_TIMESTAMP_FORMAT--> DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT--> HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT--> DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY--> $
    NLS_COMP--> BINARY
    NLS_LENGTH_SEMANTICS--> BYTE
    NLS_NCHAR_CONV_EXCP--> FALSE
    NLS_NCHAR_CHARACTERSET--> AL16UTF16
    NLS_RDBMS_VERSION--> 10.2.0.4.0
    20 rows selected.My Table
    create table r_dummy (a varchar2(4000))
    /Insert Script
    insert into r_dummy values('ʬ' )But after inserting
    When I retrieve the inserted data
    SQL> select *
      2  from r_dummy;
    A
    ?Please lemme know how to insert the above character.

  • Problem while inserting new Column in JTable

    Hi,
    I am facing Problem while inserting new Column in JTable.
    I have a JTable with one inherited ColumnModel class.
    When I am adding the column and moving towards the corresponding location, it moves successfully.
    but if I am adding another column or making any changes to table column structure the table retains the defualtcolumn structure.
    please help me to solve this..
    Regards
    Ranjith.........

    Maybe this example will help:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=579527

  • Problems with inserting elements into vectors

    Hi,
    I have a problem with the setElementAt() method for vectors.
    I want to initialise a vector that is same size as a previous vector declared in my program and insert float 0.0 in all the positions.
    The code below is a for loop to do just this where count is the size of the previous vector.
    for(int i=0;i<count; i++)
                   vLargest.setElementAt(zero,i);
              }i have declared zero as a float
    float zero = 0.0f;
    the error that i'm getting is that it that the vector cannot be applied to a float.
    Can anybody tell me what i'm doing wrong?
    Thanks

    Yes you need to store Objects in your Vector not primitives.
    float is not an Object it is a primitive. But Float is an object.

  • Problem regarding insert and Display BLOB Image in Tabular form

    I am trying to display and insert image in manual tabular form In Oracle APEX. but the image i uploaded was not inserted in wwv_flow_files table and in update button process i got "no data Found" Error...pls someone help me.... some part of code is bellow... SQL CODE IN REPORT REGION OF TABULAR FORM :- {
    SELECT '#ROWNUM#' "SNO",
    +' <img height="30" width="50" src="#WORKSPACE_IMAGES#'||F.FILE_NAME||'" alt="'||S.stud_fname||'" title="'||S.stud_fname||'" border="1"/>'AS "IMAGES", --- for display image from my table which is loaded through wwv_flow_files+
    APEX_ITEM.CHECKBOX(01,s.stud_id) "DELETE",https:
    s.stud_id|| apex_item.hidden(02,s.stud_id) "STUD ID",
    +.......+
    +.......+
    union all -- for inserting row
    SELECT '#ROWNUM#' "SNO",
    +'<input type="file" name="F17" size="5">'AS "IMAGES", -- for display image+
    APEX_ITEM.CHECKBOX(01,NULL) "DELETE",
    null|| apex_item.hidden(02,null) "STUD ID", }
    When i click on UPDATE BUTTON then following PROCESS CODE IS run :
    FOR i IN 1..APEX_APPLICATION.G_F02.COUNT LOOP
    IF APEX_APPLICATION.G_F02(i)IS NOT NULL THEN
    UPDATE STUDENT SET stud_fname=APEX_APPLICATION.G_F04(i),
    stud_addr =APEX_APPLICATION.G_F05(i), ......
    ELSE
    insert into FILE_ATMNT(ATMNT_KEY, ATMNT_NAME, FILE_NAME, MIME_TYPE, ATMNT_SIZE, CNTNT_TYPE, ATMNT_CNTNT, AUDIT_CRT_DATE ) SELECT id, name, filename, mime_type, doc_size,content_type, blob_content, SYSDATE FROM wwv_flow_files WHERE name = APEX_APPLICATION.G_F17(i);
    SELECT id into upload_ref from wwv_flow_files where name =APEX_APPLICATION.G_F17(i);
    ........ ( code for student insert Record )
    FILE_ATMNT is my attachment table in my workspace which updated through wwv_flow_files. My problem is that when i was click on update button image is not loaded into "wwv_flow_files" table so i didnt get image name bcz of $ name =APEX_APPLICATION.G_F17(i);$ this. so its show me no data found error.... Pls help me

    Mahesh wrote:
    Hi...i am mahesh...Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already).
    You'll get a faster, more effective response to your questions by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB version and edition
    <li>Web server architecture (EPG, OHS or APEX listener)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s)
    The best way to get help is to reproduce and share the problem on apex.oracle.com.
    All code should be posted wrapped in tags<tt>\...\</tt> tags to preserve formatting and prevent it being interpreted by the forum software.
    I am trying to display and insert image in manual tabular form In Oracle APEX. but the image i uploaded was not inserted in wwv_flow_files table and in update button process i got "no data Found" Error...pls someone help me.... some part of code is bellow... CODE IN  REPORT REGION OF TABULAR FORM :-
    SELECT '#ROWNUM#' "SNO",
    '<img height="30" width="50" src="#WORKSPACE_IMAGES#'||F.FILE_NAME||'" alt="'||S.stud_fname||'" title="'||S.stud_fname||'" border="1"/>'AS "IMAGES", --- for display image from my table which is loaded through wwv_flow_files
    APEX_ITEM.CHECKBOX(01,s.stud_id) "DELETE",https://forums.oracle.com/forums/post!default.jspa?forumID=137#
    s.stud_id|| apex_item.hidden(02,s.stud_id) "STUD ID",
    ....... (some code).
    union all -- for inserting row
    SELECT '#ROWNUM#' "SNO",
    '<input type="file" name="F17" size="5">'AS "IMAGES", -- for display image
    APEX_ITEM.CHECKBOX(01,NULL) "DELETE",
    null|| apex_item.hidden(02,null) "STUD ID",
    ....... (some code )
    When i click on UPDATE BUTTON  then following PROCESS CODE IS run :
    FOR i IN 1..APEX_APPLICATION.G_F02.COUNT LOOP
    IF APEX_APPLICATION.G_F02(i)IS NOT NULL THEN
    UPDATE STUDENT SET stud_fname=APEX_APPLICATION.G_F04(i),
    stud_addr =APEX_APPLICATION.G_F05(i), ..... ( some field of table)..
    ELSE
    insert into FILE_ATMNT(ATMNT_KEY, ATMNT_NAME, FILE_NAME, MIME_TYPE, ATMNT_SIZE, CNTNT_TYPE, ATMNT_CNTNT, AUDIT_CRT_DATE ) SELECT id, name, filename, mime_type, doc_size,content_type, blob_content, SYSDATE FROM wwv_flow_files WHERE name = APEX_APPLICATION.G_F17(i);
    SELECT id into upload_ref from wwv_flow_files where name =APEX_APPLICATION.G_F17(i);
    ........ ( code for insert command )
    FILE_ATMNT is my attachment table in my workspace which updated through wwv_flow_files. My problem is that when i was click on update button image is not loaded into "wwv_flow_files" table so i didnt get image name bcz of $ name =APEX_APPLICATION.G_F17(i);$  this.  so its show me no data found error.... Pls help me
    Before considering anything else, why bother with all this extra complexity? Why not use the standard form and report pattern?

  • Problem with "Insert" and "Overwrite Sequence Content"

    I'm working with XDCAM footage. I like to take all the individual clips recorded on the XDCAM disc, and after getting them into FCP, taking them and putting them all in a sequence in FCP, then using that sequence as the source in the Viewer. This allows for quick scanning of all the clips, much as is it were a digitized tape.
    I recently found the "Insert Sequence Content" and "Overwrite Sequence Content" commands in FCP, and like them in that they actually put the individual clips into my project timeline, and not just the combined sequence (which looks more or less like a nest when dropped into my project sequence).
    Here's the problem: When I put IN and OUT points in the timeline, and "Insert or Overwrite Sequence Content" using the sequence containing all the clips, the video tends to be contained to between the IN and OUT points I set in the TIMELINE, but the audio tracks tend to expand past the OUT point I set in the TIMELINE, and I can't figure out why, or how to get around this.
    Any assistance would be appreciated.

    If you're inserting or overwriting, you're basically pasting the content that you've chosen. I wouldn't think the out point would be recognized, or even wanted. If you copied 5 minutes of clips and inserted it into a sequence with a 4 minute in/out point duration, do you want to only have the first 4 minutes inserted into the sequence? If you only place an in point, it will insert all the clips, starting at that point, and it will take up as much time as the clip content's duration.
    Am I missing something here?

Maybe you are looking for