Page 1 of 1

UniDac 4.1.5 Problem - Bug?

Posted: Sat 31 Mar 2012 22:35
by ASKtec
Hello,

the following SQL-Statement will work with Unidac 4.1.4 tested in Delphi 2007 but not with Unidac 4.1.5 in Delphi XE2 Update 4:

SELECT m.id, m.datei, DATE_FORMAT(max(l.zeit),"%d.%m.%Y %T") as zeit
from motiv m join logging l on (m.datei = l.datei)
where kid = '1' and l.aktion = 'close'
group by id, datei order by id asc

I get this error: #42S22Unknown column '%d.%m.%Y %T' in 'field list'

Tested with mySQL...

Kind regards
Andreas

Posted: Sun 01 Apr 2012 18:41
by skalka
First idea: use single quotes, not double in text

so '%d.%m.%Y %T' instead of "%d.%m.%Y %T" ...


greets
sk

Posted: Tue 03 Apr 2012 11:11
by AndreyZ
To solve the problem, you should replace double quotes in your query with the pair of single quotes. Here is a code example:

Code: Select all

UniQuery.SQL.Text := 'SELECT DATE_FORMAT(max(l.zeit),''%d.%m.%Y %T'') as zeit from motiv m';