In a table I have a Date A field in the format 'dd.mm.aaaa'. In another, date field B in the format aaaammdd
I want to search all fields where date A is equal to B
In a table I have a Date A field in the format 'dd.mm.aaaa'. In another, date field B in the format aaaammdd
I want to search all fields where date A is equal to B
Try this:
SELECT A.*, B.*
FROM TabelaA A, TabelaB B
WHERE B.datab = YEAR(A.dataa) * 10000 + MONTH(A.dataa) * 100 + DAY(A.dataa)
Considering that the fields you want to be dataa
of table TabelaA
and datab
of table TabelaB
.