Thanks Noel, That is exactly what I was needing.
Noel On Monday, 6 October 2014 18:27:55 UTC+11, Noel L wrote: > > Hi, > > I have the following query which concatenates FirstName and Surname into a > field called Name :- > > SELECT C.ContactID, C.Surname || ', ' || C.FirstName AS Name, > C.StreetAddress, C.Suburb, <various other fields> > FROM Contacts AS C > > However sometimes the FirstName field is blank and in that case the field > Name comes out as blank. I was expecting Name to be Surname followed by a > comma and a space. On consulting the H2 SQL syntax, I discovered that a > NULL output is the default action for H2 concatenation, when one field is > NULL. > > However I also noticed that choosing, for example, the MySQL mode results > in "Concatenating NULL with another value results in the other value". > > My question then is, how could I achieve that result when querying an H2 > database? > > Thanks > > Noel > -- > Noel Lodge > [email protected] > -- 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. For more options, visit https://groups.google.com/d/optout.
