openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "catalina wei" <catalina....@gmail.com>
Subject Re: DB2: CAST and VARCHAR
Date Thu, 06 Sep 2007 21:49:13 GMT
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 <plinskey@gmail.com> 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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message