2014/1/22 Sha <[email protected]>

> Hi Lukas,
>
> I completed translation in to JOOQ equalent of my stored proc.
>
> But in the below statement :
>
>
> ctx.update(employee).set(employee.COMPUTED_VALUE, (  ((DSL)
> ctx).decode().when( ((employee.SAL_TYPE).nullif(new
> BigDecimal(0))).equal(new BigDecimal(1.0))  ,
>
>                                                (salary.VALUE).nullif(new
> BigDecimal(0)) )
>                                                                        )
>                                      *)).from(employee)*
>
> 1) It is giving error @ "* ).from(employee) * "
> i.e. *"The method from(Employee) is undefined for the type
> UpdateSetMoreStep<EmployeeRecord>"*
> What to do in resolving this ?
>

jOOQ currently doesn't support this vendor-specific SQL extension:
https://github.com/jOOQ/jOOQ/issues/1018

I suggest you rewrite your statement to an equivalent SQL standard
statement where you put the table source declared in the additional FROM
clause into the WHERE clause


> 2) how can ensure that the update statement is successful ?
> In JDBC it returns the number of records updated ....is there any
> provision in JOOQ ?
>

Query.execute() returns the same value JDBC returns:
http://www.jooq.org/javadoc/3.2.x/org/jooq/Query.html#execute()

-- 
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.

Reply via email to