It is giving error due to the “mismatch in datatype”.
Are you trying to show the all values using “*”?
If so, you can try following 2 probable solutions:
You may ask your Database team to add a default date value like 01/01/1900 and communicate the users regarding this as a default value. You need to do the required changes in other places replacing “*” with “default date”.
If this date field is not being used for any further calculation, you may advise your database team to change the datatype to any CHARACTER type. In that case, you can append the “*” value in this column.
i have one question, if we create one Derived table in that we will convert the data type ‘date’ to ‘char’ using to_char() function for date column.
then create new object for date and this new object is used for only LOVs.
you dont have to create a derived table for this. Al you need to do is create another object of datatype char with the sql as to_char(yourdate, format).
In the LOV of this object you can union a select ‘*’ from dual to display * along with the dates.
You can use the newly created object as the LOV of the date object.
I agree with amsmi. You can try that rather going for derived table or modification in data base level. But, use of * as an ALL values need some other activities also. Please be a bit careful while doing the same; please customize that part in sync with the changes (applying To_Char function) you are doing here.
You really don’t want to do this though, especially if you have a lot of data.
Unless yo have implemented function-based indexing, using to_char will really hamper performance because it will prevent the use of any index that has been created on the date column (which should be there if it is either a join or a commonly used column in whre clauses).
Please refer to the links that Jansi has suggested rather than pursuing this; I’d hate to think that you told someone you got the to_char idea from Bob when there is a better solution posted.