Subject Re: [IBO] Re: Sending demo of Problem
Author Helen Borrie
At 10:58 AM 27-09-01 +0200, you wrote:
>Helen,
>
> > > > 2. I set your Keylinks to ID. (Notice that I had a little trouble with this because you made this a char(12) so your unique id values get stored as "FIRST ", "SECOND " and "THIRD " and a query 'where "ID" = 'FIRST' will not find the row...
> > >
> > >According to the SQL standard and how IB implements it, it surely
> > >should.
> >
> > Nando,
> > Test it for yourself. Char fields get right-padded with ascii 32 at creation time.
>
>Sure. So do string constants when a comparison must be made against a
>char field, so that
>
>where ID = 'FIRST'
>
>is actually evaluated as
>
>where ID = 'FIRST '
>
>assuming that ID is a CHAR(12) field.
>I hope I have made it a little clearer now.
>Test it for yourself. ;-)

Nando:

Try this:

Update The Field set id = 'FOURTH' where id='FIRST'

and see what you get!

Helen


>Ciao
>--
> ____
>_/\/ando
>
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________