openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@gmail.com>
Subject Re: DB2: CAST and VARCHAR
Date Thu, 06 Sep 2007 22:30:57 GMT
I've opened OPENJPA-354 and attached a potential patch. Please review
and let me know what you think.

-Patrick

On 9/6/07, catalina wei <catalina.wei@gmail.com> wrote:
> 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
> >
>


-- 
Patrick Linskey
202 669 5907

Mime
View raw message