Equality of fields Date between tables

1

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

    
asked by anonymous 27.10.2017 / 23:00

1 answer

1

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 .

    
27.10.2017 / 23:37