Oracle SYSDATE setting same value

Hello, I am calling an Oracle stored procedure that will insert rows in a table in a For loop. When I insert each row, I set a maintenance date on the table using SYSDATE. This is done within my Oracle package. However, the SYSDATE is the exact same for every row, even if I break the seconds out like this:
to_char(tbl.maint_date, 'mm/dd/yyyy hh:mi:ss.sssssssssssssssss')
How can this be? I know the inserts are fast, but not that fast. How can every row possibly have the same sysdate?

The Oracle DATE only holds Hours, Minutes and Seconds. If you are doing inserts at the server through a stored procedures I would theorize that more then 2 per second could occur limited only be the speed of the server and of course physics. On a very modest server you can accomplish 50-100 inserts per second using Oracle.
What type is the column tbl.maint_date?
Oracle has a more granular time related column type called TIMESTAMP that can be used for your purpose. There are some functional differences between the two, so be sure to read up if TIMESTAMP appears appropriate in your case.

Similar Messages

  • Oracle 11g 64 bit - "Value too large for column" when setting Varchar2

    Hello guys,
    I have a machine running Oracle 11g - 64bits. And I have a table that contains a VARCHAR2(2000) field.
    When I try to set the value of this field to a string that contains double byte characters, I get this error:
    ORA-12899: value too large for column "QAPBG1220_11"."MYTABLE"."MYFIELD" (actual: 2433, maximum: 2000).
    Although the value I'm setting is only 811 characters (€ sign).
    The weird thing is that when I try to run the same query on another PC with Oracle 11g, 32 bits, It runs normally and the values are updated!!
    Anyone has any idea about this? It's driving me crazy
    Thanks in advance
    Zahraa

    create table MYTABLE
    MYTABLEID NUMBER(10) not null,
    MYFIELD VARCHAR2(2000)
    alter table MYTABLE
    add constraint PK_MYTABLE primary key (MYTABLEID);
    INSERT INTO MYTABLE (Mytableid, Myfield) VALUES(1, '€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€fds€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€')
    COMMIT;
    On the 32 bit, this works fine. I get the record with the values 1 and 2000 euro signs.
    On the 64 bits, there is one machine (oracle 11.2.0.1.0) that adds the row, but when I view it, the value shows as "????"
    and another machine (oracle 11.1.0.7.0) that throws an error:
    - "String Literal is too long" : if there are more than 1333 euro characters
    - Value too large for column .... : if there are less than 1333 and more than 666 characters.
    Any ideas?

  • Dynamically Set Subreport Background Color to the Same Value as Main Report Background Color

    I have a report that contains a subreport.  The main report has groupings in it.  I am dynamically setting the background color of the group rows based on an expression.  That part is working fine.  The problem that I am having is that
    I don't know how to get the subreport to "inherit" the background color of the grouping that holds it.
    Basically, I have different row shadings on my report differentiating the groupings except for the rows where the subreport shows.
    How do I go about setting the subreport background color to equal it's contaiing grouping's background color?  Thanks in advance for any and all assistance provided.

    The parameter method given by gpshukla will send the info to the subreport, but you don't need the color parameter in the main report, only the subreport. The trick is in setting the value of that parameter.
    Right-click the cell with the embedded subreport, you can select subreport properties.
    Select Parameters and add a parameter.
    The name column is the name of the parameter in the subreport (color) and value is the value to set it to.
    Set name to "color" (no quotes).
    Set Value to the same expression used to set the background color for the row.
    In the subreport, click the design surface to select the report (not header or footer).
    In the properties pane, select background color and choose expression from the dropdown.
    Type =Parameters!color.Value into the expression builder.
    This will work assuming that background color in the main report row will not change without also refreshing the subreport.
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

  • How to set item values when redirecting to the same page.

    I just created a redirect button that I want to redirect to the same page and set the 2 page items on the page to the same value they had before the redirect.
    But I can't write:
    Set These Items: P1_Permit_Number,P1_Fishing_Year
    With These Values: &P1_Permit_Number.,&P1_Fishing_Year.
    Because there are no values in the session state, since a submit has not been done.
    So how do I do this?
    I know how to get the values stored in the items, e.g., $v('P1_PERMIT_NUMBER')
    but where do I place that command? It's not allowed under "With These Values"
    And I don't really want to make this a submit button and create a process that says:
    P1_PERMIT_NUMBER := $v('P1_PERMIT_NUMBER') because that would complicate the page too much -- I already have other processes and branches on the pages whose conditions would have to be modified so that they don't run during this scenario.
    Thanks.

    Thanks Gary and Andy. I rewrote the function according to above instructions:
    function redirectToURL()
    var permitNumber = document.getElementById('P1_Permit_Number');
    var fishingYear = document.getElementById('P1_Fishing_Year');
    var url = 'f?p=&APP_ID.:1:&APP_SESSION.::::P1_Permit_Number,P1_Fishing_Year:' + permitNumber +',' + fishingYear;
    window.location.href = url;
    But when I entered a value for permit number and fishing year and redirected, the word "null" appeared in the Permit page item, instead of the permit number that I had entered.
    Remember that I am not submitting here. So if the syntax you showed me, i.e. getElementById('P1_Permit_Number'), searches for the item's session state, then it will be wrong, since there is no session state value for the items at this point. Perhaps that is the reason I got the null?
    If so, what can I do?

  • How to Set default value to dropdown list in oracle ADF

    hi,
    I need to set default value in the drop down list in oracle ADF.
    If you take in HTML :
    <select>
    <option value="">Select Value </option>
    <option value="saab">Saab</option>
    <option value="mercedes">Mercedes</option>
    <option value="audi">Audi</option>
    </select>
    Like this i need to set default value in drop down llist in oracle ADF.
    Thanks and Regards,
    M. Ramu.

    Hi Ramu,
    Please be more clear on ur post whts ur Jdev version and wht type of dropdown u r using model driven or static list..?????
    Its hard to help u without proper info..
    Just have a look into this before u post a thread...
    https://forums.oracle.com/forums/ann.jspa?annID=56
    Regards,
    Suganth.G

  • Can't Set Item Value After Calling Stored Procedure

    In a forms6i program unit, I call a stored procedure. The stored procedure executes successfully. Then I set the value of a date item on a data block to sysdate.
    When I run the form and execute the program unit the stored procedure executes successfully, but then the program unit gives me a No Data Found error when I set the value of the date item on the block. The value of the date item never changes. However, if I comment out the call to the stored procedure, the date item changes to sysdate and there is no error message generated.
    Just to be sure, I moved the logic to set the date item value to a separate button on the form. Then I re-ran the program unit. The stored procedure executed successfully. Then I clicked the button to set the value of the date field on the block, which gave me the same no data found error.
    Then I commented out the call in the program unit and re-ran the test. The program unit executed. Then I clicked the button to set the date value in the block and it was set to sysdate with no errors.
    Why can I not set the date item after running a stored procedure?

    Seems like a MSDTC config issue
    See if this helps
    http://support.microsoft.com/kb/2027550/en-us
    http://zarez.net/?p=1469
    http://danieladeniji.wordpress.com/2013/03/06/microsoft-sql-server-linked-server-error-the-partner-transaction-manager-has-disabled-its-support-for-remotenetw/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Java.sql.SQLException: Non supported character set: oracle-character-set-17

    Hi,
    i am trying to execute an Oracle procedure from JDBC. The procedure accepts a Nested table as an input parameter. Definition of the nested table is given below.
    Database – Oracle 10g.
    Application Server – JBOSS 4.2.1
    I get the following exception._
    java.sql.SQLException: Non supported character set: oracle-character-set-178
    at oracle.gss.util.NLSError.throwSQLException(NLSError.java:46)
    I.  JDBC  Code_
    Session s = HibernateUtil.getSession();
    Transaction tr = s.beginTransaction();
    con=s.connection();
    oraConn = (OracleConnection) con.getMetaData().getConnection();
    TableObject obj=new TableObject();
    obj.setId(new Integer(123));//Tested ok, stroing in DB
    obj.setDescr("test"); // this line throwing error
    obj.setCre_user(new Integer(456));
    obj.setUpd_user(new Integer(789));
    obj.setXfr_flag("Y");
    ArrayList al=new ArrayList();
    al.add(obj);
    Object[] objAray = al.toArray();
    ArrayDescriptor arrayDescriptor =ArrayDescriptor.createDescriptor("T_TEST_SYN", oraConn);
    ARRAY oracleArray = new ARRAY(arrayDescriptor, oraConn, objAray);
    cs = (OracleCallableStatement)oraConn.prepareCall("call PKG_OBJ_TEST.accept_ui_input(?) ");
    cs.setArray(1, oracleArray);
    cs.execute();
    tr.commit();
    public class TableObject implements SQLData{
    private String sql_type = "T_OBJ_TEST";
    private int id;
    private String descr;
    //private Date cre_date;
    private int cre_user;
    //private Date upd_date;
    private int upd_user;
    private String xfr_flag;
    public TableObject()
    public TableObject (int id,String descr,int cre_user,int upd_user,String xfr_flag)
    // this.sql_type = sql_type;
    this.id = id;
    this.descr = descr;
    // this.cre_date=cre_date;
    this.cre_user=cre_user;
    //this.upd_date=upd_date;
    this.upd_user=upd_user;
    this.xfr_flag=xfr_flag;
    public String getSQLTypeName() throws SQLException {
    return "T_OBJ_TEST";
    public void readSQL(SQLInput stream, String typeName) throws SQLException {
    //sql_type = typeName;
    id=stream.readInt();
    descr=stream.readString();
    //cre_date=stream.readDate();
    cre_user=stream.readInt();
    //upd_date=stream.readDate();
    upd_user=stream.readInt();
    xfr_flag=stream.readString();
    public void writeSQL(SQLOutput stream) throws SQLException {
    try {
    stream.writeInt(this.id);
    System.out.println("Iddddd");
    stream.writeString(this.descr);
    System.out.println("Desccccccccccccccc"+":"+descr);
    //stream.writeDate(cre_date);
    stream.writeInt(this.cre_user);
    System.out.println("userrrrrrrrrrrr");
    //stream.writeDate(upd_date);
    stream.writeInt(this.upd_user);
    System.out.println("upd uiserrrrrrrrrrr");
    stream.writeString(this.xfr_flag);
    System.out.println("flagggggggggggggggggggg"+xfr_flag);
    }catch (SQLException se) {
    System.out.println("Table object sql exception");
    se.printStackTrace();
    catch (Exception e) {
    System.out.println("Table object exception");
    * @return the id
    public int getId() {
    return id;
    * @param id the id to set
    public void setId(Object obj) {
    Integer iobj= (Integer)obj;
    this.id =iobj.intValue();
    * @return the descr
    public String getDescr() {
    System.out.println("getDescr "+descr);
    return descr;
    * @param descr the descr to set
    public void setDescr(Object obj) {
    System.out.println("setDescr "+obj);
    String sobj = (String)obj;
    this.descr=sobj.toString();
    System.out.println("setDescr "+obj);
    * @return the cre_user
    public int getCre_user() {
    return cre_user;
    * @param cre_user the cre_user to set
    public void setCre_user(Object obj) {
    Integer iobj=(Integer)obj;
    this.cre_user = iobj.intValue();
    * @return the upd_user
    public int getUpd_user() {
    return upd_user;
    * @param upd_user the upd_user to set
    public void setUpd_user(Object obj) {
    Integer iobj=(Integer)obj;
    this.upd_user = iobj.intValue();
    * @return the xfr_flag
    public String getXfr_flag() {
    return xfr_flag;
    * @param xfr_flag the xfr_flag to set
    public void setXfr_flag(Object obj) {
    this.xfr_flag = (String)xfr_flag;
    II.  Oracle database object details
    Details of Object and Nested table created in the database.
    T_TEST_SYN is a public synonym created for t_tab_obj_test
    CREATE OR REPLACE TYPE t_obj_test as object (
    id number(10),
    descr varchar2(100),
    --cre_date  date,
    cre_user number(10),
    --upd_date  date,
    upd_user number(10),
    xfr_flag varchar2(1),
    CONSTRUCTOR FUNCTION t_obj_test ( id IN NUMBER DEFAULT NULL,
    descr IN varchar2 default null,
    --cre_date  in date      default null,
    cre_user in number default null,
    --upd_date  in date      default null,
    upd_user in number default null,
    xfr_flag in varchar2 default null ) RETURN SELF AS RESULT ) ;
    CREATE OR REPLACE TYPE BODY t_obj_test as
    CONSTRUCTOR FUNCTION t_obj_test ( id IN NUMBER DEFAULT NULL,
    descr IN varchar2 default null,
    --cre_date  in date      default null,
    cre_user in number default null,
    --upd_date  in date      default null,
    upd_user in number default null,
    xfr_flag in varchar2 default null ) RETURN SELF AS RESULT IS
    BEGIN
    SELF.id := id ;
    SELF.descr := descr ;
    --SELF.cre_date  := cre_date ;
    SELF.cre_user := cre_user ;
    --SELF.upd_date  := cre_date ;
    SELF.upd_user := cre_user ;
    SELF.xfr_flag := xfr_flag ;
    RETURN ;
    END ;
    END ;
    CREATE OR REPLACE TYPE t_tab_obj_test AS TABLE OF t_obj_test ;
    CREATE OR REPLACE PACKAGE BODY PKG_OBJ_TEST AS
    PROCEDURE accept_ui_input ( p_tab_obj_test in T_TAB_OBJ_TEST ) IS
    BEGIN
    FOR row IN p_tab_obj_test.First .. p_tab_obj_test.LAST
    LOOP
    INSERT INTO OBJ_TEST ( ID,
    DESCR,
    CRE_DATE,
    CRE_USER,
    UPD_DATE,
    UPD_USER,
    XFR_FLAG )
    VALUES ( p_tab_obj_test(row).ID,
    p_tab_obj_test(row).DESCR,
    NULL,
    p_tab_obj_test(row).CRE_USER,
    NULL,
    p_tab_obj_test(row).UPD_USER,
    p_tab_obj_test(row).XFR_FLAG ) ;
    END LOOP ;
    COMMIT ;
    END accept_ui_input ;
    END PKG_OBJ_TEST;
    /

    Check your CLASSPATH enviroment variable. Try to add something like c:\Ora10g\jlib\orai18n.jar.
    From "JDBC Developer’s Guide and Reference":
    orai18n.jar
    Contains classes for globalization and multibyte character sets support
    This solved the same error in my case.

  • SQLException: Non supported character set: oracle-character-set-178

    Hello,
    I run a j2ee application on the Sun J2EE Application server.
    I migrated to 0racle 9.2.0.3.
    I have an ejb making a connexion with the oci driver
    and in it I manipulate XMLType:
    PreparedStatement pst = cnx.prepareStatement(sql);
    XMLType xt = XMLType.createXML(cnx, "<ENTETE></ENTETE>");
    pst.setObject(1, xt);
    I've got an exception on the setObject method :
    java.sql.SQLException: Non supported character set: oracle-character-set-178
    at oracle.gss.util.NLSError.throwSQLException(NLSError.java:46)
    at oracle.sql.CharacterSetUnknown.failCharsetUnknown(CharacterSetFactory
    Thin.java:171)
    at oracle.sql.CharacterSetUnknown.convert(CharacterSetFactoryThin.java:1
    35)
    at oracle.xdb.XMLType.getBytesString(XMLType.java:1687)
    at oracle.xdb.XMLType.getBytesValue(XMLType.java:1623)
    at oracle.xdb.XMLType.toDatum(XMLType.java:431)
    at oracle.jdbc.driver.OraclePreparedStatement.setORAData(OraclePreparedS
    tatement.java:2745)
    at oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedSt
    atement.java:3208)
    I have the nsl_charset12.zip , ojdbc14.jar,xdb.jar,xmlparserv2.jar in the J2EE_CLASSPATH of my server.
    Does any one have an idea.
    Thanks , Edwige

    (*bump*)
    Almost the exact same problem here...
    "conn" is an object of type OracleConnection
    "cst" is an object of type "CallableStatement"
    "xml" is a String holding a well-formed XML document (say, "<foo><bar>value</bar></foo>")
    XMLType xt = XMLType.createXML(conn, xml);
    cst.setObject(1, xt); // BOOM! Non supported character set: oracle-character-set-178
    Other relevant details:
    Using the 9.2.0.3 JDBC thin client (ojdbc14.jar)
    Using the newest nls_charset12.zip (in the 9.2.0.3 download section under the "1.2/1.3" heading.
    JDK1.4.1_03 (04?)
    Oracle itself is 9.2.0.3
    database charset is 'WE8MSWIN1252' (yeah, I fought with the DBA and lobbied for UTF-8, but obviously he won that battle... sigh...)
    Also relevant... prior to a few days ago, it worked. Then, the DBA did an upgrade and the charset errors began. It's hard to get a straight answer from him because his English isn't very good, but my guess is that he updated it from 9.2.0.1 to 9.2.0.3.

  • Set argument value

    Hi,
    I have a Job below. And passing an argument value to it.
    sys.dbms_scheduler.set_job_argument_value( job_name => '"SCHEMA1"."TEST_JOB"', argument_name => '"IN_DATE"', argument_value => 'sysdate');
    I am passing sysdate. This is a daily job and every day the in parameter is sysdate only.
    Did I pass the value correctly? worrried about the quotes around sysdate.
    Should that be 'sysdate' or sysdate?
    G.

    Hi,
    If you pass 'SYSDATE' the literal value 'SYSDATE' will be passed which is probably not what you want.
    If you pass SYSDATE the value of SYSDATE as a VARCHAR2 is passed which is probably what you want. However this is evaluated only at argument-setting time, i.e. all runs of the job will run with the same job argument value. This may or may not be what you want.
    If you want the value of SYSDATE on the day the job is scheduled to run , you could just use SYSDATE in the job action or use the metadata argument job_scheduled_start.
    Hope this helps,
    Ravi.

  • Sysdate gives incorrect value

    Hello experts,
    Our company uses Oracle 10g DB and we are using Stored Procedures to fetch employees data from various tables. We fetch only fresh data depending on the date when it is retrived. Hence the result of the query depends on Sysdate value. The databse has two instances and all are synchronised to same local time.
    Recently we noticed that sometimes we get stale data which can only happen when sysdate value is not ccorrect. Can anyone suggest under what circumstances Oracle might return wrong value of sysdate?
    Thanks in advance.........

    Thanks evryone for your suggestions. But i have tried "Select Sysdate from Dual". It always gives me correct date. But the problem is very sporadic. Most of the times, the stored procedure returns correct value but occasionally it retrives stale data.
    Through java logs(we invoke SP from java code), we could find out that the data returned was stale. This brought us to the conclusion that sysdate being used is incorrect sometimes.
    We asked DBA team who confirmed that All Instances of DB are synched up and have same Sysdate.
    Can you please suggest some way to trace the actual query being executed to fetch the result. This would unveil the actual problem ( which we believe is the incorrect sysdate value ) . On being asked, DBA suggested that such tracing cannot be done as it would impact performance of all other systems using same DB.
    Can you please help on this?

  • How to set coumn value for an ADF Table?

    Hi,
    I am currently using Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660. I have an ADF table in which I have a column created using View Object as Select one choice. I want to set the value(first time as selected one) in it which is coming from my second View Object. Can anyone please provide me sample code for the same?
    Thanks,
    Vik

    Hi,
    I have no idea what you are asking for. Did you try model driven List-of-Values defined for the attribute you want to update using a select one choice ? See this document http://www.oracle.com/technetwork/developer-tools/adf/learnmore/dec2010-otn-harvest-199274.pdf and look for how to create dependent list of values. Just follow the first part of it that explains how to create model driven LOV
    Frank

  • Set Default Value of Multi-select list item

    I have a multi-select list item I want to default the value of to '%' (which is really '%null%') and have it selected. I tried setting default value of item, but it doesn't take '%null%'. I also tried a computation with a static of
    :P507_ITEM := '%null%'; How do you get the default value set and selected?

    Hi
    Shijesh is right, you need to change your null return value and use that return value as your default. Try and use something of the same datatype as your real return values if you plan to use '%' to display all as it will make your queries simpler. eg.
    Company A returns 1
    Company B return 2
    % returns 0
    Then your query would be...
    SELECT ...
    FROM ...
    WHERE company_id = DECODE(:P_COMPANY,1,1,2,2,0,company_id)
    Hope this makes sense.
    Cheers
    Ben

  • How to check empty string and null? Assign same value to multiple variables

    Hi,
    1.
    How do I check for empty string and null?
    in_value IN VARCHAR2
    2. Also how do I assign same value to multiple variables?
    var_one NUMBER := 0;
    var_two NUMBER := 0;
    var_one := var_two := 0; --- Gives an error
    Thanks

    MichaelS wrote:
    Not always: Beware of CHAR's:
    Bug 727361: ZERO-LENGTH STRING DOES NOT RETURN NULL WHEN USED WITH CHAR DATA TYPE IN PL/SQL:
    SQL> declare
      2    l_str1   char (10) := '';
      3    l_str2   char (10) := null;
      4  begin
      5  
      6    if l_str1 is null
      7    then
      8      dbms_output.put_line ('oh STR1 is null');
      9    elsif l_str1 is not null
    10    then
    11      dbms_output.put_line ('oh STR1 is NOT null');
    12    end if;
    13  
    14    if l_str2 is null
    15    then
    16      dbms_output.put_line ('oh STR2 is null');
    17    elsif l_str2 is not null
    18    then
    19      dbms_output.put_line ('oh STR2 is NOT null');
    20    end if;
    21  end;
    22  /
    oh STR1 is NOT null
    oh STR2 is null
    PL/SQL procedure successfully completed.
    SQL> alter session set events '10932 trace name context forever, level 16384';
    Session altered.
    SQL> declare
      2    l_str1   char (10) := '';
      3    l_str2   char (10) := null;
      4  begin
      5  
      6    if l_str1 is null
      7    then
      8      dbms_output.put_line ('oh STR1 is null');
      9    elsif l_str1 is not null
    10    then
    11      dbms_output.put_line ('oh STR1 is NOT null');
    12    end if;
    13  
    14    if l_str2 is null
    15    then
    16      dbms_output.put_line ('oh STR2 is null');
    17    elsif l_str2 is not null
    18    then
    19      dbms_output.put_line ('oh STR2 is NOT null');
    20    end if;
    21  end;
    22  /
    oh STR1 is null
    oh STR2 is null
    PL/SQL procedure successfully completed.
    SQL> SY.

  • How do I set the value of a dynamic row text field

    I have a repeated row form which contains a button and multiple text fields.  There is a text field (Input Data Field) further up with some information I want to place in the table and multiple buttons that I want to read the value of and set to the table.  I apologize there are multiple questions I have and I am using pseudocode to describe it.
    Top form looks like
    InputField
    | ButtonX1 | ButtonY1 | DescriptionX1 (read only Text Field)
    | ButtonXn | ButtonY1 | DescriptionXn
    OutputRow looks like
    | ButtonOutput | OutputField1 | OutputField2 | OutputField3 |
    So I would like it to do
    ButtonX1.click
    OutputTable.OutputRow.addInstance(true)  //this works - everything else I have questions on
    OutputTable.OutputRow.OutputField1.rawValue = DescriptionX1.rawValue
    Question 1
    How do I address the location in each table to set a value
    Question 2
    How do I get the value of the description field in the same table and row as the button
    I would like to say something to the effect of  OutputTable.OutputRow[??].OutputField1.rawValue = this.parent.DescriptionX
    OutputTable.OutputRow.OutputField2 = InputField.rawValue
      Same question as above - how do I specify a dynamic row - is this the proper syntax for getting the value from the input field?
    OutputTable.OutputRow.OutputField3 = this.ButtonLabel
    Question 3
      How can I get the value of the button's label to set in the field
      There should be very many of these buttons and buttons will be added - I would prefer to set the value based on the button's label to make the value easier - not requiring changing the code
    Question 4 - unrelated to those above.
    Is it possible to build the first table
    | ButtonX | ButtonY | Description |
    from an XML File.  I have seen examples of how to build if it is just data, but can the XML be pushed into a form with code to do the above actions?

    Each object in a form must have a unique name. I doing so it is not neccessarily the name but the path or SomExpression associated with that object that must be unique. In your case you have a Table.Row.object configuration. The Row is the part that is repeating so to give each object a unique name an instance number is placed on the repeating part. So objects in the 1st row woudl be Table.Row[0].object...objects in the second row woudl be Table.Row[1].object etc .....You can see this by adding a debug instruction on the Enter event of the description field. Put the code app.alert(this.somExpression) and when you enter the field you will see what the somExpression is. Do this for a few rows and you will see the pattern (don't forget to remove the debug code from the enter event). Now you know what you have to use to address the fields. If no instance is given it is assumed to be 0 ..that is why only the 1st row is being affected.
    So now to answer your questions:
    Question1: The square bracket notation is an issue for javascript (this is the notation for an array) so we have to use a different means of addressing the field to include the instance number. So to address the Description in the 3rd row we woudl use:
    xfa.resolveNode("Table.Row[2].Description").rawValue = "This is my new description";
    Note that the instance number is 2 for the 3rd row because the instance numbers are 0 based.
    Question2. The resolveNode notation allows you to pass a string so you can also concatinate expressions to make the string. If you are writing code on a button in the same row you can get the instance that you are on by using the expression this.parent.index. The "this" portion refers to the current object (the button) and the parent.index gets you th eindex of the Buttons parent. If the button is embedded deeper in a hierarchy then you can continue to add parent indicators until you get back to the node that you want. So rewriting your expression from Q1 it woudl be:
    xfa.resolveNode("Table.Row[" + this.parent.index + "].Description").rawValue = "This is my new description";
    Question3: The buttons caption can be retrieved by using ButtonName.caption.value.text.value
    Question4: When you say build from an XML file. What are you expecting to come from the XML file? The caption that goes on the button? Typically the XML file carries data (not to say that it cannot carry other things). Just need a bit of clarification on this one first.
    Hope that helps
    Paul

  • How to set multiple values in one context-attribute

    Hi all,
    Anybody knows a possibility to set multiple Values to a context-attribute?
    I know it how to get it with the following code:
    String break[]= request.getParameterValues("break");
    Now I want to do something like:
    request.setParameterValues(break[no]);
    where no is a counter in a loop.
    With the Method setAttribute(), I overwrite the previous inserted value.
    Thanx
    Robert

    I have not explizit declared break as an array.
    It is the Context- Attribute I want to send. I thaught that I can use it as an array in the same way I can do it when I send Data from an HTML- Form (with multiple values) to an servlet.
    I don't know how to declare the Attribute explizit as an array.
    that it is you wanted to know?
    I think my main problem is to get an array from the servlet to the jsp. Is there an other possibility (other than via Context-Attributes) to do that?
    thanx
    robert

Maybe you are looking for

  • WebEx SSO with Microsoft AD 2008

    Hello Everyone, We are trying to setup our Microsoft AD to sync our accounts with WebEX Connect, using the SSO (Single Sign ON) We are only able to use the Domain credencials when we are inside on the corporate network and logging on the WebIM. Do we

  • RFC destination definition with non-unicode external program

    Hello All, we have one issue with our RFID system connecting to WM system (SWD).  For most functions, external RFID server/middleware makes RFC call to SAP system.  Means, from outside system to inside SAP.  This seems to be working fine. But in one

  • Itunes 7 and storing games

    I am using itunes 7 and have purchase a couple of games from the store. Itunes sticks them in the unknown artist folder in my library and then says it can't download them to my ipod because it can't find them!. The way i got around this was to delete

  • Question for structuring an application

    Are there any Best Practice Guides for structuring applications in WDP4J?( like separation of model in own DC etc...) Best regards, Thomas

  • DYMO printing in portrait instead landscape

    Our DYMO Twin Turbo Labelwriter is printing in portrait instead of landscape when I print from Address Book, so the text is across the short length of the label and very small. I've installed the latest driver (7.7.1) and reset the printing system to