... Note, the relevant section explaining about creating bind values in the manual is here: http://www.jooq.org/manual/JOOQ/BindValues/
2012/3/18 Lukas Eder <[email protected]>: > Hello, > >> I'm now facing the following concern, which I don't know how to >> achieve, even since I've read the doc and browsed the api javadoc : > > Where did you run into problems? Converting your " - " string to an > org.jooq.Field? > Something along these lines should work: > > ------------------------------------------------------------ > import static org.jooq.impl.Factory.*; > > Factory create = new Factory(...); > > // Alias the countries table: > Countries t = Countries.COUNTRIES.as("t"); > > // Concat several org.jooq.Field objects. > // Use Factory.val() to create a bind value > create.select(t.ccode, concat(t.ccode, val(" - "), t.cname).as("value_")) > .from(t) > .orderBy(t.country.asc()); > ------------------------------------------------------------ > > Although, I don't know what t.country should refer to... If you do > need the casting to char, use the Field.cast() methods... > > Cheers > Lukas
