Hi John, In SQL, use || to join two strings. It seems odd, but + doesn't join strings.
On Jul 5, 2:14 pm, John Kane <[email protected]> wrote: > I'm a total newbie with H2 and with data bases so this is probably a > stupid question but what I'm I doing wrong. I simply want to take a > list of words and capitalize the first letter of each word. > > Below is what I have so far. Each individual command works fine so I > am clearly not understanding how to combine the select statements or > else I may be misusing the LENGTH command. > > Any suggestions would be greatly appreciated. > > thanks > john > =============================================== > > CREATE TABLE list (ID INT PRIMARY KEY, WORD CHARACTER(20)) > AS SELECT * FROM CSVREAD('C:\RDATA\CAPS.CSV.TXT'); > 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 -- 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.
