It runs fine in a database client SQuirrel, but gives a BadSqlGrammarException if I run it from code and read data from XML.
The error is: "not allowed in OUTER JOIN [select * ...]".
I guess it's because I cast a birthday to date within left join on. I need to do a cast. And I need to join these two tables.
Does anyone know how I can cast to date within a join with JDBCTemplate?