Hi Shyam, OK, I've missed it I guess. Why did you choose to call ctx.updateQuery()? That is used for the "Model API", which has no "set()" method. You're probably looking for the DSL API, which can be accessed through ctx.update() See the manual for details: http://www.jooq.org/doc/3.2/manual/sql-building/sql-statements/dsl-and-non-dsl/
Shyam, are you using the manual and the Javadoc to navigate the API? http://www.jooq.org/javadoc/3.2.x/ Let me know if there are any other open issues. Cheers Lukas 2014/1/22 Sha <[email protected]> > Not yet Lukas, > Struggling. But no go . > > ~Shyam > > > On Wednesday, January 22, 2014 6:39:56 PM UTC+5:30, Lukas Eder wrote: > >> Hi Shyam, >> >> Could you resolve this issue (in the other thread)? >> >> >> 2014/1/22 Sha <[email protected]> >> >>> thank you Lukas, >>> >>> But where I stuck up now. >>> >>> *Actual SQL code is some thing like this :* >>> >>> String updateQuery = "update emp_job_tree " + >>> " set computed_value = case when ( isnull(asp_type,0) ) = 1.0 then >>> isnull(sal.value,0) else isnull(sal.value,0) end " + >>> " from emp_job_tree uoijt "; >>> >>> *Then equalent code in JOOQ , i have written is :* >>> >>> ctx.updateQuery(uoijt).set(uoijt.COMPUTED_VALUE, >>> ( ((DSL) ctx).decode().when( ((ASP_TYPE).nullif(new >>> BigDecimal(0))).equal(new BigDecimal(1.0)), (sal.VALUE).nullif(new >>> BigDecimal(0)) ) >>> .otherwise((sal.VALUE).nullif(new BigDecimal(0))) >>> )).from(uoijt) ; >>> >>> *In above snippet me getting one compilation error.* >>> >>> Error-- "* The method >>> set(TableField<UserOverrideIndepJobTreeRecord,BigDecimal>, >>> Field<BigDecimal>) is undefined for the type >>> UpdateQuery<UserOverrideIndepJobTreeRecord> "* >>> >>> >>> Whole problem is >>> in the line "((ASP_TYPE).nullif(new BigDecimal(0))).equal(new >>> BigDecimal(1.0)" >>> BigDecimal >>> >>> Cant i directly check with 0 simething like >>> *(ASP_TYPE).nullif(0))* >>> >>> If yes, how can I do that ? >>> >>> If not , how can resolve the Error-- "* The method >>> set(TableField<UserOverrideIndepJobTreeRecord,BigDecimal>, >>> Field<BigDecimal>) is undefined for the type >>> UpdateQuery<UserOverrideIndepJobTreeRecord> "* >>> >>> >>> Thank you. >>> ~Shyam >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "jOOQ User Group" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> -- > You received this message because you are subscribed to the Google Groups > "jOOQ User Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
