user9093700 wrote:Whenever you have a question, please post a little sample data (CREATE TABLE and INSERT statements) for all the tables involved, so the people who want to help you can re-create the problem and test their ideas. Also post the results you want from that data, and an explanation of how you get those results from that data.
iam having two tables
t_person --- having one column Dateofbirth(date)
temp_t_person--- having a column DOB(varchar2(100))
How to compare this two columns, i tried in as below can anyone correct me..That looks right, assuming the format of temp_t_person.dob is 'dd/mm/yyyy'. But that's only 10 characters, and dob can be 100 characters long. What is in postions 11 through 100? If you want to ignore those extra characters, then maybe you need to use
(select trim(upper(surname)), trim(upper(firstname)), dob from TEMP_T_PERSON intersect
select trim(upper(surname)), trim(upper(firstname)), to_char(dateofbirth,'dd/mm/yyyy') from T_Person where company_id = 207930)
in your query instead of dob.
SUBSTR (dob, 1, 10)