Hi Patrick, Yes, <length> is required. I would suggest you use appendLength() method in DB2Dictionary for varchar type.
Catalina On 9/6/07, Patrick Linskey <[EMAIL PROTECTED]> wrote: > > Hi, > > Is it ever valid in DB2 to just do a 'CAST(? AS VARCHAR)', or must it > always be a 'CAST(? AS VARCHAR(<length>))'? > > The current DB2 dictionary does the former; I'm working on some code > that puts a parameter into the SELECT clause, and to get that to work, > I need to make the CAST include the length information. Should I be > changing the addCastAsType() method in DB2Dictionary, or just doing > the length bit in my particular situation? > > -Patrick > > -- > Patrick Linskey > 202 669 5907 >
