I am building report in data warehouse which relay on comparing daily checks and payments for one of the restaurants. I need to be able to filter data on date field however it needs to be compared with string that looks like US date format but is string so
Select a.* from
xx a, xy b
where
a.payment_date = b.check_date
Format of a.payment_date is DD-MON-YY(date) and format of b.check_date is MM/DD/YYYY however it is a string. Any pointers to most efficient ways of solving this problem greatly appreciated.
JOINwith conversion operators will hurt performance in a bad way. The efficient way would be to add a real date column. Sadly, it's seldom the realistic one.JOINfor sure, but the work involved may not be worth the speed gain if the query isn't time sensitive.