Sorry Lukas,
   I am not able to follow the answer you provided for error 1.
Me getting the same error even if remove all complete complex logic and 
 try with a simple one line statement like below

*ctx.update(employee).set(employee.COMPUTED_VAL , employee.ORIGINAL_VALUE 
).from(employee).execute();*

It is still giving error @ "* ).from(employee) * " 
i.e. *"The method from(Employee) is undefined for the type 
UpdateSetMoreStep<EmployeeRecord>"*

Can you give an example for the above one for "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"

Me confused to how to go interpret your suggestion and go ahead.

Sorry for troubling you.

~Shyam



On Wednesday, January 22, 2014 6:38:19 PM UTC+5:30, Lukas Eder wrote:
>
>
> 2014/1/22 Sha <[email protected] <javascript:>>
>
>> 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