xml has datetime field, that need to be compared with date coming from stored procedure (normal date). I need to compare xml timestamp filed with sql date. Getting error for not proper casting.
where xmlexists('$d/*:order[xs:date(orderDate)=xs:date(IN_TRIP_CREATION_DT)]' passing ORDER_DA as "d");
The orderDate filed is of the format 2013-12-05T00:00:00.000 and IN_TRIP_CREATION_DT is input from sp of the format 2013-12-05.
We need to use only date /xmldate format , Varchar conversion is not allowed nor the XMLTABLE usage.
Please help me to solve this issue.