Subject | Re: Charset of OCTETS in PK causing problems? |
---|---|
Author | rjschappe |
Post date | 2004-06-16T15:09:29Z |
> Hmm, the problem is probably that you are using a CHARThanks Helen!
> type for the PK, instead of a VARCHAR. Character set
> OCTETS is "just bytes" so all of those blank spaces
> to the right are ascii(32). If your key is CHAR(13)
> then '123DEF' is stored as '123DEF*******'
> (I'm representing blanks as *) and is NOT equal to '123DEF'.
>
> Convert them to VARCHAR and it will be fine.
>
> /heLen
I am wondering... is there any overhead of using a VarChar for a PK
(and all FK's) vs just a Char... I don't want to move to OCTETS for a
speed increase and negate all the benefits if using VarChar will only
cause me to slow down???
Just for grins... I did a SELECT with the field padded out with
spaces and FB still did not find the record... it must be doing
something "funny" in there! ;)
Thanks,
--Raymond