Hello
 
we use h2 as test database as an oracle emulation.
With version 1.3.167 an new alias was introduced trunc as alias of truncate.
 
This alias prevents us to create our own alias trunc which is an method in 
oracle. Its also not possible to remove this alias.
 
Please get the following sql work again right now the first drop does not 
work and the create throws an exception.
 
drop ALIAS trunc; 
commit;
CREATE ALIAS trunc as '
import java.text.*; 
import java.util.*; 
@CODE 
java.util.Date trunc(java.sql.Timestamp timeStamp)  throws Exception {
        Calendar c = Calendar.getInstance();
        c.setTime(new Date(timeStamp.getTime()));
        c.set(Calendar.HOUR, 0);
        c.set(Calendar.MINUTE, 0);
        c.set(Calendar.SECOND, 0);
        c.set(Calendar.MILLISECOND, 0);
        return  c.getTime();
} ';
 
 
Or if database is in oracle mode remove the alias.
 
// Marco

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to