Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Help! Problem with string comparisons

Re: Help! Problem with string comparisons

From: TurkBear <johng_at_nospam.mm.com>
Date: Wed, 20 Jan 1999 18:54:26 GMT
Message-ID: <36a625d5.14918371@news2.mm.com>


Because of the way char and varchar2 handle 'padding' an equate is difficult... You could concatenate enough blanks to the varname so that is matches exactly the full length of the field and try that....or declare Varname to be Varchar2...

"Pilsbury" <Pilsbury_at_hotmail.com> wrote:

>Hi,
>
>I am trying to programatically select a row from a table using string
>comparisons.
>
>The column in the table is declared as NOT NULL VARCHAR2(9).
>
>I am selecting a field from a Forms 4.5 module, which is a char (9) (and
>has in fact been selected from the same table).
>
>I assign the value of that field to a variable, Varname CHAR(9);
>When I do the Select * from table where column = varname, it returns 11k
>rows instead of 1.
>
>Normally I combat this using rpad and rtrim, thought this is not working.
>If anyone has any ideas, please help! Many thanks,
>
>Nick
>
>Pilsbury_at_hotmail.com

To reply please remove the 'nospam' part of the address Received on Wed Jan 20 1999 - 12:54:26 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US