Hi, In the next release of H2, ISNULL will be supported (as an alias for IFNULL).
Regards, Thomas On Tue, Feb 7, 2012 at 5:00 PM, Sebastian Paul <[email protected]> wrote: > Hi, > I'm using H2 via Hibernates EntityManager and noticed that the JPQL > function "ISNULL" does not work (function not found). I looked into > H2Dialect, and obviously translation of ISNULL is not covered. Maybe > it should use registerFunction to map from ISNULL to IFNULL. > However, COLESCE works fine, no need to use a custom dialect for this. > Maybe COALESCE should be used in favor to ISNULL. The TSQL (MS SQL > Server) documentation categorizes ISNULL as system function (http:// > msdn.microsoft.com/en-us/library/ms184325.aspx) and CALESCE (together > with CASE and NULLIF) as expressions (http://msdn.microsoft.com/en-us/ > library/ms190349.aspx). > Strange that this does not work out-of-the-box with H2, and I did not > find related information or bug reports. And why is ISNULL contained > in the JPA 2 specification? > > Cheers, Sebastian > > -- > You received this message because you are subscribed to the Google Groups "H2 > Database" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/h2-database?hl=en. > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
