View Single Post

   
  #4 (permalink)  
Old 05-10-2008, 03:03 PM
Serge Rielau
 
Posts: n/a
Default Re: Not able to assign select query "WITH UR" CLUSE TO A VARIABLE

situ wrote:
> Hi,
> i'm using Db2 Version 8.2.
>
> in a stored procedure i'm assiging a the result of sql query ( with
> "WITH UR" ) to a variable as shown below.
>
>
> SET v_temp = ( SELECT 1 FROM
> Table_1 A , Table_2 B
> WHERE a.cd=b.cd )
> WITH UR;
>
> But i'm getting the fallowing syntax error.

The SET statement does not support the isolation clause

> i even tried to put that clause inside the bracket but no luck.

That would be isolation clause in a subquery, presently not supported

> can any body please suggest be the work around for this.

Try SELECT INTO, or using a (one row) cursor

Cheers
Serge


--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Reply With Quote