This is a java code, the activity_date is stored as 01/15/2002 format.
In Oracle there are rows updated. In db2 it returns no rows. how should I use date function so that AND AND activity_date = + "date(" + detailsDataBean.getValue("ACTIVITY_DATE") + ")"; can work.
DB2 always stores a column defined as date in an internal format that you cannot see. The 8 numbers are stored in 4 bytes (without the dashes, slashes, etc) internally within the row. The sequence of the numbers is always yyyymmdd.
When a date is SELECTed into a 10 character variable (with the dashes, slashes, etc) the format (yyyy-mm-dd, dd/mm/yyyy, or whatever) is determined by the installation default, user exit, or can be set for that SQL statement with the CHAR function. The same applies to date values inserted, updated, or in a where clause.
Check out the SQL reference Vol 1 for details on the CHAR function.