>hmmm....I agree, something is up. I even tried it with table2 having no records, using iif() instead of nvl():
>
>
>select aid, aagcy, iif(isnull(bvalue),'a',bvalue) as bvalue ;
> from table1 ;
> left join table2 on (table2.bidv = table1.aid) into cursor tempo readwrite
>
>
>bvalue was the right length in the resulting recordset. VFP's pretty smart I guess. :)
>
>
>
>>Steve,
>>That is not true. First record being null or not doesn't affect the resulting size. It's known by VFP using the fieldsize of bvalue.
>>Cetin
>>
HA!
That is something new to me!
This is not written anywhere, or at least I couldn't found it.
It works even with SET ENGINEBEHAVIOR 70:
SET ENGINEBEHAVIOR 70
CREATE CURSOR Table1 (Aid I, AAGcy I)
CREATE CURSOR Table2 (bidv I, bvalue C(20))
INSERT INTO Table1 VALUES (1, 1)
INSERT INTO Table1 VALUES (1, 2)
INSERT INTO Table2 VALUES (2, [aaaaaaaa])
select aid, aagcy, NVL(bvalue,'a') as bvalue ;
from table1 ;
left join table2 on (table2.bidv = table1.aid);
ORDER BY Table1.Aid;
into cursor tempo readwrite
WAIT WINDOW LEN(tempo.bvalue)
BROWSE NORMAL
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.