>I see the problem with NVL in my testing - I have adressed the wrong target in this test, so NVL works as expected by you and Gregory.
>
>But it the it will return a string instead of .NULL. what is wrong again.
I found this solution (for older VFP versions) - haven't tested it too much
CREATE CURSOR curTest (i1 I NULL)
INSERT INTO curTest VALUES (.NULL.)
delete
INSERT INTO curTest VALUES (1)
INSERT INTO curTest VALUES (20)
CREATE CURSOR t1 (charF C (11) NULL)
INSERT INTO t1 VALUES (null)
SELECT IIF(ISNULL(i1),charF,PADR(i1,11)) FROM curTest, t1
MODIFY STRUCTURE
If it's not broken, fix it until it is.
My Blog