Hmm Did you try TRIM(trailing ' ' from sm_issue_symbol)?
On Jan 22, 2008 4:59 PM, novotny <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> That's what I wanted to but for whatever reason maybe because it's CHAR or
> maybe because it's informix, but it doesn't trim the string so I still get
> whitesp
Hi,
That's what I wanted to but for whatever reason maybe because it's CHAR or
maybe because it's informix, but it doesn't trim the string so I still get
whitespace padding... :-(
Jason
Stephen Boyd-3 wrote:
>
> Why don't you change your select clause to this?
>
>select *trim(sm_issue_
Why don't you change your select clause to this?
select *trim(sm_issue_symbol) as sm_issue_symbol*,
tm_id
from
sec_master,
category_security,
tier_mast
where sm_secid = cs_secid
and cs_tierid = tm_id
and sm_issue_symbol
Hi,
I'm not quite sure what you mean-- this is what I have in my sql-ibatis.xml
file:
select
sm_issue_symbol,
tm_id
from
sec_master,
category_security,
tier_mast
where sm_secid = cs_secid
and cs_tier
create custom TypeHandlerCallback to trim string
whitespace
Well the database designer chose to use CHAR(6), so I wouldn't have this
problem if it were VARCHAR but since it's CHAR, I believe the informix
driver pads it with extra spacing hence the need for some kind of custom
handler whi
Well the database designer chose to use CHAR(6), so I wouldn't have this
problem if it were VARCHAR but since it's CHAR, I believe the informix
driver pads it with extra spacing hence the need for some kind of custom
handler which I can't get to work...
Thanks, Jason
Kezerashvili, Denis wrote
Can you use a db function to trim the value before it reaches ibatis? I am
not familiar with informix, but in db2 I use the rtrim() function. I am
sure there must be something similar.
On Jan 18, 2008 2:01 PM, novotny <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm using an informix database and
One more point, you need the following in your sql mapping xml file, in
you result map, for the column you want to trim:
Replace things in [] with correct values for your use.
Make sure the StringTypeHandlerCallback is either fully qualified name
of defined in the typeAlias.
Denis
-Orig
I think the problem may be that you are specifying jdbsType="CHAR",
should not it be jdbsType="VARCHAR". Aren't you dealing with strings not
just single characters. The call back is never invoked, since you get
back a VARCHAR not CHAR.
Denis
-Original Message-
From: novotny [mailto:[EMAIL
I take it back, you are defining callback for getting values out of the
db. Sorry for the misleading reply.
-Original Message-
From: novotny [mailto:[EMAIL PROTECTED]
Sent: Friday, January 18, 2008 2:02 PM
To: user-java@ibatis.apache.org
Subject: how to create custom TypeHandlerCallback t
You have only defined it for storing to the db. You need to include the
following in your sql mapping file
#columnToTrim,handler=StringTypeHandlerCallback#
Denis
-Original Message-
From: novotny [mailto:[EMAIL PROTECTED]
Sent: Friday, January 18, 2008 2:02 PM
To: user-java@ibatis.apache
11 matches
Mail list logo