Re: int value

Re: int value

 

  


I have this query in a procedure where colval1 is IN parameter of type
integer.
I prepare a statement str and execute it using cursor.
but since colval1 is passed at runtime how can i use it in my query.

set str= 'select * from tablename where id ='|| colval1;
>
> here colval1 is of type integer.when i write it like this it give
> complile
> time error and when i write char(colval1) it give run time error
> how can i append an integer value in a query.
>
>
> Regards
>
> Amit Singal
>
>
>
>
Original Message -----
From: "Amit Singal "
<db2udbdba-ezmlmshield-x96968745.[Email address protected]
To: "LazyDBA Discussion" <[Email address protected]
Sent: Wednesday, September 28, 2005 11:20 AM
Subject: int value


> 'select * from tablename where id ='|| colval1;
>
> here colval1 is of type integer.when i write it like this it give complile
> time error and when i write char(colval1) it give run time error
> how can i append an integer value in a query.
>
>
> Regards
>
> Amit Singal
>
>
>
>
>
> ---------------------------------------------------------------------
> PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
> website: http://www.LazyDBA.com
> To unsubscribe: http://www.lazydba.com/unsubscribe.html
>
>



DB2 & UDB email list listserv db2-l LazyDBA home page