Oracle adapter issues with NCHAR

Hello,
we are trying to use a jdbc connection for Oracle DBMS.
The problem is that when we try to do a “Select” statement using a data type “nChar” into the where column we must pad the input vale before passing it into the input value of the adapter. This happens mainly because the nchars in oracle have a fixed length.
I would like to know if there is a way to bypass this behavior so that i can retrieve, for example, record like this:
supposing that name is an nchar( 8 ) column

select surname from people where name='joe'

instead of be obliged to do

select surname from people where name='joe     '

(or padRight the name value till 8 chars before using it)
This is my environment:
webMethods 9.7
Adapter 9.0
ojdbc7

Can someone help me?
thanks!

Before passing the input name to your select adatper service, you have to transform (use WmPublic/pub.string:padRight) the name to have spaces after your name.

Pass the transformed name to your adapter service and see if that works.

Thanks for your answer. Of course if I pad the value it works but as I’ve said I do’n’t want to. If I were going to use padRight I will have to use it in too many pieces of my code. So my question is if there’s a property to set into the connection or if I have to use a different driver or something like that.

Thanks again!

I understand your point that the current solution is not feasible and a best approach. Let me do some analysis to check if JDBC adapter supports this or we can also do this via FF for padding spaces at right.

Share me if you find any other solution. Thanks

thanks again! In the meantime i’ve tried to move from ojdbc7 to ojdbc6 and it doesn’t seem to change anything…

Some news ? :frowning:

P.S.
what do you meant with "do this via FF " ?

It was just a guess if this can be done via flat file. But I need to try.

Did you find anything?

Silvio,
For your need, write your custom code.

Thanks,

One option (assuming you must stick with nchar): select surname from people where rtrim(name)=‘joe’

Percio