Hi, The problem is that "+" is not the string concatenation operator in ANSI SQL. Use || instead. However H2 supports "+" in the Microsoft SQL Server compatibility mode:
drop table list; CREATE TABLE list (ID INT PRIMARY KEY, WORD CHARACTER(20)); INSERT INTO list (id, word) values(1,'dog'), (2, 'cat'), (3, 'bill'), (4, 'horse'); SELECT UPPER(LEFT(word,1)) FROM list; SELECT SUBSTRING(word,2,LENGTH(word)) FROM list; SELECT LENGTH(word) FROM list; SELECT UPPER(LEFT(word,1)) || SUBSTRING(word,2,LENGTH(word)) FROM list; set mode mssqlserver; SELECT UPPER(LEFT(word,1)) + SUBSTRING(word,2,LENGTH(word)) FROM list; set mode regular; Regards, Thomas -- 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.
