The problem is the variable size of the result. The first record which Visual FoxPro finds, in this case, might not fulfil the condition in the IIF(), and, therefore, return 0 (size: 1 byte). Then, VFP decides that this is the correct size for the rest of the table - and you get the asterisk (which means, "the result does not fit").
In general, you should avoid variable-sized results in a SELECT - SQL command - or at least make sure that the minimum size of a field is big enough.
>hi
>how can is achive what i want?
>
>
>create cursor foo (f i)
>insert into foo values(112)
>insert into foo values(11)
>insert into foo values(-11)
>insert into foo values(-121)
>
>select IIF(f>=0,f,0) as a1, IIF(f < 0,f,0) as a2 from foo
>select IIF(f>=0,f,0) as a1, IIF(f < 0,-f,0) as a2 from foo
>select foo
>browse
>
>
>
>what i see in the returned cursor are '*' where the negative integers are present
>
>I want the integers to appear in its place instead of the *
>
>Tia
>suhashegde
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)