Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Binding on a char column
Hi!
I'm using bind variables to execure select sql queries on my oracle
database (version 9 and version 10).
My database contains some char columns (char (50), char(1), etc)
Using bind variables I have a problem with trailing blanks at the end
of the string in a char column. I mean that if I insert in a column of
char(10) type 'test' string, I will have in oracle db 'test '
string (with trailing blanks).
When I bind that column searching for 'test' string I'd need to RTRIM
the column:
select * from TABLE where RTRIM(col1) =:bind1
where bind1 will be associated to test.
If my query is:
select * from TABLE where col1 =:bind1
I will not have the result expected if bind1 is 'test', I should bind
'test ' with blank.
So, I know that RTRIM is not good for performance, does oracle gives me the possibility to work into another way?
I hope to be clear!
Thanks!
Received on Wed Jan 17 2007 - 07:20:41 CST
![]() |
![]() |