Title: Mensagem

I got an exception using JDBCVirtualUserTable mailet with HSQL....

There seems to be a problem with the query below

"select VirtualUserTable.target_address from VirtualUserTable, VirtualUserTable as VUTDomains where (VirtualUserTable.user like ? or VirtualUserTable.user like '\\%') and (VirtualUserTable.domain like ? or (VirtualUserTable.domain like '\\%' and VUTDomains.domain like ?)) order by concat(VirtualUserTable.user,'@',VirtualUserTable.domain) desc limit 1"

that renders to :

select VirtualUserTable.target_address from VirtualUserTable, VirtualUserTable as VUTDomains where (VirtualUserTable.user like 'diogo' or VirtualUserTable.user like '\%') and (VirtualUserTable.domain like 'e2.com.br' or (VirtualUserTable.domain like '\%' and VUTDomains.domain like 'e2.com.br')) order by concat(VirtualUserTable.user,'@',VirtualUserTable.domain) desc limit 1

It throws a java.sql.SQLException: Unexpected token 
 
What's wrong?
If I replace the concat function with '+' and remove the limit 1 it works fine!! Is this the correct workaround??
 
 
 
 
 
Diogo Saad
[EMAIL PROTECTED]
Inter Business Tecnologia e Servicos
 
 

Reply via email to