Sql sript for Insert of data with repeating values

It has been a long long time since I had to do write and use any SQL scripts, please forgive the question. I used to use a script to insert values into a table as part of my job. I have forgotten what the script I used was and since lost all my Oracle note books and other DBA material.
I did a search and went through 30 pages of results, I didn't see what I'm looking for.
The data is from one large file that is appended at the end and sometimes updated somewhere in the middle of the set which is considered new data. I am not concern with getting the data out of the file, I got that handled but the insert into the table - transactions - is where I'm lost.
I used to use a script to load the data, about 6 years ago, and it would load the file, exclude the data that was already in the table and insert the new data and the data with the changes.
The data columns are date, time, reference, transaction code, location, debit amount, fee amount, balance.
The date repeats but the time and reference values are unique.
Any help with this script is appreciated.

Hi,
welcome to the forum..!
You can use Oracle's merge statement to (update + insert) data into a table ... if the data exists update it with the new values and if it does not, then insert it.
Here's a link to get you started...
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9016.htm
Since, the data is from a file, you could create an external table on the file and directly do a select from the file.
MERGE INTO bonuses D
   USING (SELECT employee_id, salary, department_id FROM employees
   WHERE department_id = 80) S
   ON (D.employee_id = S.employee_id)
   WHEN MATCHED THEN UPDATE SET D.bonus = D.bonus + S.salary*.01
     DELETE WHERE (S.salary > 8000)
   WHEN NOT MATCHED THEN INSERT (D.employee_id, D.bonus)
     VALUES (S.employee_id, S.salary*0.1)
     WHERE (S.salary <= 8000);in the above example, the
SELECT employee_id, salary, department_id FROM employeesis the source data. instead of loading the file into a temporary table and then merge into the target table , you could read from <<<external_table_on_your_file>> and then do a merge into the target table.
http://www.oracle.com/technology/products/oracle9i/daily/sept19.html
If you encounter any problems, please post the full description of your error.
Thanks,
Rajesh.
Please mark this/any other answer as helpful or answered if it is so. If not, provide additional details/feedback.
Always try to provide create table and insert statements to help the forum members help you better.

Similar Messages

  • Custom PL/SQL API that inserts the data into a custom interface table.

    We are developing a custom Web ADI integrator for importing suppliers into Oracle.
    The Web ADI interface is a custom PL/SQL API that inserts the data into a custom interface table. We have defined the content, uploader and an importer. The importer is again a custom PL/SQL API that will process the records inserted into the custom table and updates the STATUS column of the custom interface table. We want to show the status column back on the spreadsheet.
    Defined the 'Document Row' import rule and added the rows that would identify the unique record.
    Errored row import rule, we are using a SELECT * from custom_table where status<>'Success' and vendor_name=$param$.vendor_name
    The source of this parameter is import.vendor_name
    We have also defined an Error lookup.
    After the above setup is completed, we invoke the create document and click on Oracle->Upload.
    The records are getting imported, but the importer program is failing with An error has occurred while running an API import. The ERRORED_ROWS step 20003:ER_500141, parameter number 1 must contain the value BIND in attribute 1.'

    The same issue.
    Need help.
    Also checked bne.log, no additional information.
    <bne:document xmlns:bne="http://www.oracle.com/bne">
    <bne:message bne:type="DATA" bne:text="BNE_VALID_ROW_COUNT" bne:value="11" />
    <bne:message bne:type="DATA" bne:text="BNE_INVALID_ROW_COUNT" bne:value="0" />
    <bne:message bne:type="ERROR" bne:text="An error has occurred while running an API import"
    bne:cause="The ERRORED_ROWS step 20003:ER_500165, parameter number 1 must contain the value BIND in attribute 1."
    bne:action="" bne:source="BneAPIImporter" >
    <bne:context bne:collection="collection_1" />
    </bne:message><bne:message bne:type="STATUS"
    bne:text="No rows uploaded" bne:value="" >
    <bne:context bne:collection="collection_1" /></bne:message>
    <bne:message bne:type="STATUS" bne:text="0 rows were invalid" bne:value="" >
    <bne:context bne:collection="collection_1" /></bne:message></bne:document>

  • TopLink does not generate SQL statements for inserting new objects

    TopLink does not generate SQL statements for inserting new objects. Why?
    Thanks in advance...

    Please see the response in
    Why does not unitofwork.commit write data to the database?
    Regards,
    Chris

  • Inserting Current Date with time stamp in oracle database

    Hi Experts,
                     I want to insert the current Date and time stamp in a field in the Oracle Database Table.
    I am able to insert date but i am not able to insert the date with time stamp. Any Suggestions??
    Thanks
    Naveen

    Naveen,
    Do you want to get current date (from sysdate) with a specific format or transform a value containing a date/time value to insert it in ORACLE ?
    Usually, you insert current datetimestamp in a date field using this :
    TO_DATE(sysdate,'dd/mm/yyyy hh:mi:ss')
    you may have to tweak the format pattern ('dd/mm....') according to your needs
    if you want to transform a date, use something like this:
    TO_DATE(your_date,your_format)
    but make sure your format is compliant with your date, ie
    TO_DATE('31/12/2008','MM/DD/YYYY') could raise error (litteral does not match) cuz ORACLE can't recognize 31 as a month pattern
    Chris

  • Sql queries for retrieving setups data for functional modules

    Hi,
    Can anyone give me the sql queries for retrieving setups data for functional modules (GL, AP, AR, FA, and CM) from Database.

    Hi,
    Can anyone give me the sql queries for retrieving setups data for functional modules (GL, AP, AR, FA, and CM) from Database.

  • Db adaptor for insert- SQLException: [SQL0803] Duplicate key value specified

    While invoking db adaptor for insert on table 1 selecting values form another table, i am gtting error ; before3 insert i am updating table 2nd using db adaptor
    QUERY insert into CRPDTA.F5504579 (SELECT * FROM CRPDTA.F5504571 WHERE PAHDC=#v_updatedRecord_HDC)
    Error :
    Non Recoverable System Fault :
    <bpelFault><faultType>0</faultType><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert_Ledger_F5504579' failed due to: Pure SQL Exception. Pure SQL Execute of insert into CRPDTA.F5504579 (SELECT * FROM CRPDTA.F5504571 WHERE PAHDC=?) failed. Caused by java.sql.SQLException: [SQL0803] Duplicate key value specified.. The Pure SQL option is for border use cases only and provides simple yet minimal functionality. Possibly try the "Perform an operation on a table" option instead. This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value "--803" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. </summary></part><part name="detail"><detail>[SQL0803] Duplicate key value specified.</detail></part><part name="code"><code>-803</code></part></bindingFault></bpelFault>
    Please suggest....

    Easter1976 wrote:
    Hi please can you help me. I think I am having problems with tranactions. I am deleting from a table and then inserting in the same table with the same key that I have just deleted. Simple then - don't do that. It suggests a flaw in the design. Either use a new key or do an update.
    Note that you would get a duplicate key error if the table is set up such that it doesn't
    actually delete but doesn't something such as creating a log entry with a delete flag set.

  • Insert same data with next holiday date

    Hi All,
    I have write a pl block where in i need to copy the existing records from the
    table A to table A itself with date+1.
    Say for eg. there is a situation were daily one record is inserted into table A
    and there is a data column init but NO records for sat,sunday and holidays
    I need to write a block to insert records for sat,sun and holiday in the table A
    which rec? if rec is missing for say for eg date 04/May/2007 then I need to take
    records from 03/May/2007 and insert a new records by copying all the rec from previous date with data column in A as 04/May/2007.
    like wise there are lac of rec in table A and thousands of missing rec for sat,sun & holiday.
    I am trying to do this by taking cursor and finding out the missing rec and insert it.
    i have just started can any one of you help in this. by posting the best logic for this
    Thanks,
    AAK.

    Hi1
    pls try this --
    SQL>
    SQL> set serveroutput on
    SQL>
    SQL>
    SQL> set lin 1000
    SQL>
    SQL> select * from emp_q;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO C PHONE
          7777 Avik       CLERK           7839 02-MAR-07       3456        263         30 M 12547896
          6666 prithwi    CLERK           7839 22-JUL-06       1234        248         30 M 14782563
          7639 Roni       CLERK           3434 17-DEC-80      12121                    50 F
          7499 ALLEN      SALESMAN        7469 20-FEB-81       1234        300         30 M
          7521 WARD       SALESMAN        7698 14-FEB-07       1234        500         10 F
          7566 JONES      MANAGER         7469 02-APR-81       1000                    10 F
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1234       1400         53 F
          7698 BLAKE      MANAGER         7839 01-MAY-81       1234                    40 M
          7782 CLARK      MANAGER         7839 09-JUN-81       1234                    20
          6194 Verona     CLERK           7839 30-APR-07       2365        125         30 F 12543698
          6698 Fereda     CLERK           7839 30-APR-07       2365        125         30 M 12543698
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO C PHONE
          6903 Aliva      CLERK           7839 30-APR-07       2365        125         30 F 12543698
          7411 Naba       CLERK           7839 27-APR-07       1450        452         30   29631478
          7529 Indra      SALESMAN        7839 27-APR-07       5025        250         30 M 28963147
          7698 BLAKE      MANAGER         7839 01-MAY-81       1234                    40 M 23515485
          7782 CLARK      MANAGER         7839 09-JUN-81       1234                    20   23651489
          7788 SCOTT      ANALYST         7566 19-APR-87       1234                    40 F 25483698
          7839 KING       PRESIDENT       7839 17-NOV-81       1234                    40 F 23691436
          7844 TURNER     SALESMAN        7698 08-SEP-81       1234          0         30 F 23459687
          7876 ADAMS      CLERK           7788 23-MAY-87       1234                    10 M 23984297
          7900 BARRY      CLERK           7698 03-DEC-81       1234        500         10 F 25983147
          7902 FORD       ANALYST         7566 03-DEC-81       1234                    40 F 29541236
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO C PHONE
          7934 MILLER     CLERK           7458 23-JAN-82       1234                    10 F 24893175
    23 rows selected.
    SQL>
    SQL>
    SQL> insert into emp_q
      2  select empno,ename,job,mgr,sysdate+1,sal,comm,deptno,code,phone
      3  from emp_q
      4  where empno = 7777;
    1 row created.
    SQL>
    SQL>
    SQL> commit;
    Commit complete.
    SQL>
    SQL> select * from emp_q;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO C PHONE
          7777 Avik       CLERK           7839 02-MAR-07       3456        263         30 M 12547896
          6666 prithwi    CLERK           7839 22-JUL-06       1234        248         30 M 14782563
          7639 Roni       CLERK           3434 17-DEC-80      12121                    50 F
          7499 ALLEN      SALESMAN        7469 20-FEB-81       1234        300         30 M
          7521 WARD       SALESMAN        7698 14-FEB-07       1234        500         10 F
          7566 JONES      MANAGER         7469 02-APR-81       1000                    10 F
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1234       1400         53 F
          7698 BLAKE      MANAGER         7839 01-MAY-81       1234                    40 M
          7782 CLARK      MANAGER         7839 09-JUN-81       1234                    20
          6194 Verona     CLERK           7839 30-APR-07       2365        125         30 F 12543698
          6698 Fereda     CLERK           7839 30-APR-07       2365        125         30 M 12543698
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO C PHONE
          6903 Aliva      CLERK           7839 30-APR-07       2365        125         30 F 12543698
          7411 Naba       CLERK           7839 27-APR-07       1450        452         30   29631478
          7529 Indra      SALESMAN        7839 27-APR-07       5025        250         30 M 28963147
          7698 BLAKE      MANAGER         7839 01-MAY-81       1234                    40 M 23515485
          7782 CLARK      MANAGER         7839 09-JUN-81       1234                    20   23651489
          7788 SCOTT      ANALYST         7566 19-APR-87       1234                    40 F 25483698
          7839 KING       PRESIDENT       7839 17-NOV-81       1234                    40 F 23691436
          7844 TURNER     SALESMAN        7698 08-SEP-81       1234          0         30 F 23459687
          7876 ADAMS      CLERK           7788 23-MAY-87       1234                    10 M 23984297
          7900 BARRY      CLERK           7698 03-DEC-81       1234        500         10 F 25983147
          7902 FORD       ANALYST         7566 03-DEC-81       1234                    40 F 29541236
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO C PHONE
          7934 MILLER     CLERK           7458 23-JAN-82       1234                    10 F 24893175
          7777 Avik       CLERK           7839 04-MAY-07       3456        263         30 M 12547896
    24 rows selected.
    SQL> Regards.
    Satyaki De.

  • Help!!  problem for insert a date in postgre from creator

    i formatt the date, and this code:
    SimpleDateFormat sdm=new SimpleDateFormat("dd-mm-yyyy)";
    Date fecha= sdm.parse("12-05-2007");
    compraDataProvider.setValue("fecha",rw,fecha);
    display this error
    Can't infer the SQL type to use for an instance of java.util.Date. Use setObject() with an explicit Types value to specify the type to use.

    postgres (PostgreSQL) 8.0.13
    postgresql-8.0-319.jdbc3.jar
    i have the same problem with postgresql
    i cant insert a row in a table with two columns codigo and name
    public String salvar_action() {
    CachedRowSetDataProvider cdp = getHombreDataProvider();
    try {
    RowKey rk = cdp.appendRow() ;
    cdp.setCursorRow(rk) ;
    cdp.setValue("hombre.codigo",rk,codigo.getText()) ;
    error("paso aqui 1");
    cdp.setValue("hombre.nombre",rk,nombre.getText()) ;
    error("paso aqui 2");
    cdp.commitChanges() ;
    info("Row Inserted via Data Provider") ;
    cdp.refresh(); // release rowset memory.
    } catch (Exception ee) {
    error( ee.getMessage() ) ;
    return null;
    did the same thing with firebird and no problem.. doing that..
    anyone knows some solution?

  • Insert query for insert all data into table in vb6 but it insert 1 row in table

    This is My insert query in vb6 but it insert 1 row in table
    But i want insert all data in the table which contain the id =1.
    Note that billtabsuport is blank
    i want solution for this
    strSQL = " select * from billtabsuport1 where StockID=" & lblid.Caption
    Set DBrecordset = DBConnection.Execute(strSQL)
    strSQL = " Insert into billtabsuport values('" & DBrecordset("StockID") & "','" & DBrecordset("C_Name") & "','" & DBrecordset("C_Add") & "','" & DBrecordset("C_Mobile") & "','" & DBrecordset("Invoice_No") & "','" & DBrecordset("Date") & "','" & DBrecordset("Order_No") & "','" & DBrecordset("T_Name") & "','" & DBrecordset("Dest") & "','" & DBrecordset("D_Date") & "','" & DBrecordset("Tyres_Serial_No") & "','" & DBrecordset("P_Desc") & "','" & DBrecordset("PR") & "','" & DBrecordset("Branded_NonBranded") & "','" & DBrecordset("Claim_No") & "','" & DBrecordset("Qty") & "','" & DBrecordset("U_Price") & "','" & DBrecordset("I_Value") & "','" & DBrecordset("V_Rate") & "','" & DBrecordset("V_Amt") & "','" & DBrecordset("Size") & "','" & DBrecordset("Pattern") & "','" & DBrecordset("TypesOfStock") & "','" & DBrecordset("TypesOfTube_Flap") & "','" & DBrecordset("VatAmount") & "')"
    DBConnection.Execute (strSQL)

    The syntax for inserting from one set of tables to a new table is:
    insert into newtable
    (field1, field2, etc)
    select somefield1, somefield2, etc
    from some other tables
    where whatever

  • SQL Developer 3.2 - Exporting data with TIMESTAMP datatype

    Hi,
    We have users that are attempting to export data with the Timestamp format to Excel (xls format) using SQL Developer 3.2.  When attempting to sort the Timestamp in either asc or desc order, Excel is having issues sorting correctly.  I suggested that the user just do all the sorting within their SQL Developer session but they require the ability to slice and dice in Excel.
    This is definitely not an issue with Excel as the users have previously exported Timestamp data from Toad and been able to sort without issue.  Any thoughts as to what might resolve this issue? 
    Thanks.

    We're not formatting timestamps in Oracle as numbers/dates in Excel. They'll need to properly format the Excel column/cells to get it to sort the way they want vs being treated as simple strings.

  • Preparing Dynamic SQL statement for inserting in Pro*C

    Hi Friends,
    From quite some time i am struggling writing Dynamic SQL statement for dynamic insert and update in Pro*C.
    Can somebody go through my code and suggest me the rigth way of doing.
    Right now it throws an error saying " Error while updating ORA-00904: invalid column name "
    Please help me.
    Girish.
    int main()
    EXEC SQL BEGIN DECLARE SECTION;
    char *uid ="scott/tiger";
    static char sqlstmt[129];
    struct /* DEPT record */
    int dept_num;
    char dept_name[15];
    char location[14];
    } dept_rec;
    EXEC SQL END DECLARE SECTION;
    EXEC SQL WHENEVER SQLERROR DO sql_error();
    EXEC SQL CONNECT :uid;
    dept_rec.dept_num = 50;
    strcpy(dept_rec.dept_name,"ADMIN");
    strcpy(dept_rec.location,"IN");
    strcpy(sqlstmt,"UPDATE dept set DNAME = dept_rec.dept_name where DEPTNO = dept_rec.dept_num");
    EXEC SQL EXECUTE IMMEDIATE:sqlstmt;
    EXEC SQL COMMIT;
    exit(0);
    void sql_error()
    printf("\nError while updating %s",sqlca.sqlerrm.sqlerrmc);
    EXEC SQL ROLLBACK;
    }

    A bit rusty here but this is how I see it.
    Think of it this way ..
    all Oracle is going to see is:
    UPDATE dept set DNAME = dept_rec.dept_name where DEPTNO = dept_rec.dept_num
    Its NOT going to know what dept_rec.dept_name is or dept_rec.dept_num is ..
    it doesnt go back and fill in those values.
    You need something like
    strcpy(sqlstmt,"UPDATE dept set DNAME = \"");
    strcat(sqlstmt,dept_rec.dept_name);
    strcat(sqlstmt,"\" where DEPTNO = ");
    strcat(sqlstmt,dept_rec.dept_num);
    printf(sqlsmt); # Just to be sure the update statement look right during testing.

  • Is it possible to make a delta load for a Master data with Standard DS

    I have a full load bringing huge data for master data with standard datasource.
    I want to run a delta due to huge no. of records but when I create a new Infopackage it dont give a option for delta update.
    Are delta loads specific to only standard or customized DS's or any other reason behind that ?

    I kind of understand what you are asking about, but I am unclear as to how it pertains to our BO SDK.
    You are wanting to find the differences between a large dataset and another large dataset.
    I am not sure what an Infopackage is.
    Are you using the BO Enterprise SDK or some other product?
    Jason

  • CPO XSL Transform for CPSC Form data with Grid

    Does anyone have an XSL Transform worked out that conveniently parses the CPSC Form output from Service Link when it has a grid in it?
    For example the data from CPSC Service Link might look like:
    <root>
       <Common>
          <Action ClassID="">Some Action</Action>
          <RequisitionID>123</RequisitionID>
       </Common>
       <Attributes/>
       <FormData>
          <Dictionary.Field>Some Data</Dictionary.Field>
          <DictionaryWithGrid-1.Field1>somevalue</DictionaryWithGrid-1.Field1>
          <DictionaryWithGrid-1.Field2>someothervalue</DictionaryWithGrid-1.Field2>
          <DictionaryWithGrid-1.Field3>yetanothervalue</DictionaryWithGrid-1.Field3>
          <DictionaryWithGrid-2.Field1>somevalue2</DictionaryWithGrid-2.Field1>
          <DictionaryWithGrid-2.Field2>someothervalue2</DictionaryWithGrid-2.Field2>
          <DictionaryWithGrid-2.Field3>yetanothervalue2</DictionaryWithGrid-2.Field3>
       </FormData>
    </root>
    So the desired output would be
    <Row>
       <Field1>somevalue</Field1>
       <Field2>someothervalue</Field2>
       <Field3>yetanothervalue</Field3>
    </Row>
    <Row>
       <Field1>somevalue2</Field1>
       <Field2>someothervalue2</Field2>
       <Field3>yetanothervalue2</Field3>
    </Row>
    I'm having difficulty getting the right XSL select when the tag is something like 'DictionaryWithGrid-#.Field'.
    Thanks!

    That worked great, Svetlana!  Thank you very much for the help.
    I made some slight mods to make it even more portable and intuitive for XSL/XML beginners.
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0"
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
          xmlns:msxsl="urn:schemas-microsoft-com:xslt">
    <!-- Replace CHANGEME below with the name of the CPSC Form Dictionary to transform -->
    <xsl:variable name="Dictionary">CHANGEME</xsl:variable>
    <xsl:template match="root">
      <Table>
          <xsl:call-template name="ProcessOne">
            <xsl:with-param name="pos" select="1" />
          </xsl:call-template>
      </Table>
    </xsl:template>
      <xsl:template name="ProcessOne">
        <xsl:param name="pos" />
        <xsl:variable name="RowName" select="concat($Dictionary, '-', $pos)" />
        <xsl:if test="FormData/*[starts-with(name(), $RowName)] != ''">
          <Row>
            <xsl:for-each select="FormData/*[starts-with(name(), $RowName)]">
              <xsl:if test="starts-with(name(.), $RowName)">
                <xsl:variable name="FieldName" select="substring-after(name(.), '.')"/>
                <xsl:element name="{$FieldName}">
                  <xsl:value-of select="."/>
                </xsl:element>
              </xsl:if>
            </xsl:for-each>
          </Row>
          <xsl:call-template name="ProcessOne">
            <xsl:with-param name="pos" select="number($pos+1)" />
          </xsl:call-template>
        </xsl:if>
      </xsl:template>
    </xsl:stylesheet>

  • API for inserting/updating system profile option values

    Hi,
    Is there any API that I can use to insert/update system profile option values via PL/SQL?
    Regards,
    Santhosh Jose

    Hi Santosh,
    You can think of using the FNDLOAD utility to download the values from one instance and upload to other instance.
    ## Now lets have a look at the profile option using oracle's FNDLOAD
    FNDLOAD apps/$CLIENT_APPS_PWD O Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct POR_ENABLE_REQ_HEADER_CUST.ldt PROFILE PROFILE_NAME="POR_ENABLE_REQ_HEADER_CUST" APPLICATION_SHORT_NAME="ICX"
    ## Note that
    ## POR_ENABLE_REQ_HEADER_CUST is the short name of profile option
    ## We aren't passing the user profile option name in this case. Validate using ...
    ########----->select application_id, PROFILE_OPTION_NAME || '==>' || profile_option_id || '==>' ||
    ########----->USER_PROFILE_OPTION_NAME
    ########----->from FND_PROFILE_OPTIONS_VL
    ########----->where PROFILE_OPTION_NAME like '%' || upper('&profile_option_name') || '%'
    ########----->order by PROFILE_OPTION_NAME
    ########----->/
    ## Now to upload
    FNDLOAD apps/$CLIENT_APPS_PWD O Y UPLOAD $FND_TOP/patch/115/import/afscprof.lct POR_ENABLE_REQ_HEADER_CUST.ldt
    For other config components download and upload you can refer the link- http://www.apps2fusion.com/apps/scripts/19-oracle-fndload-script-examples
    Thanks,
    Sanjay

  • How to compare date with null value

    Hi
    I have a date filed and i assigned that input box with context attribute of type Date.
    Here my problem is
    when the end user not entered any thing (null ) the i have give some defaul date.
    so first in the action method i have to check the date with null
    if it is null i have to give default date.
    so please let me know how to over come this.
    thanks
    Mukesh

    Hi
    You can get your date in your action method like
    Date newDate=new Date();
    Date myDate= wdThis
                              .wdGetYourComponentNameController()
                                      .wdGetContext()
                                           .currentYourNodeNameElement()
                                                           .getYourDateName();
    if ( myDate== null) {
             wdContext.currentContextElement().setYourDateName(newDate);
    else{...........//continue your other validations or calling other methods}
    Regards
    Abhijith YS
    Message was edited by:
            Abhijith YS

Maybe you are looking for