Thanks. I take a look at that. Sometimes you can't see the forest from the trees.
>Steve,
>
>It looks like your source table and target table both contain the job field? If so you need to alias it inside your function calls.
>
> IIF(!EMPTY(mrc.job) AND gla.OBJECT="500",mrc.Amount,0.00), ;
>
>>I was trying to fill values into a new table from an old table. Inside the SCAN of the old table, I placed the following code:
>>
>>INSERT INTO xxxx (rc, passnbr,glacct,Ppdate,job,OBJECT,M2M,M3M,M4M,L2L,L3L,L5L,L6L,L7L) ;
>> VALUES ;
>> (mrc.rc, ;
>> mrc.passnbr, ;
>> mrc.glacct, ;
>> mrc.Ppdate, ;
>> mrc.job, ;
>> gla.OBJECT, ;
>> 0.00, 0.00, 0.00,
>> IIF(!EMPTY(job) AND gla.OBJECT="500",mrc.Amount,0.00), ;
>> IIF(!EMPTY(job) AND INLIST(gla.OBJECT,"505","510","515","520"),mrc.Amount,0000000.00), ;
>> IIF(EMPTY(job) AND gla.OBJECT="500",mrc.Amount,0000000.00), ;
>> IIF(EMPTY(job) AND INLIST(gla.OBJECT,"505","510","515","520"),mrc.Amount,0000000.00), ;
>> IIF(EMPTY(job) AND !INLIST(gla.OBJECT,"500","505","510","515","520"),mrc.Amount,0000000.00))
>>
>>When I checked the values of L2L through L7L, they all contained zero. I knew that several of the fields should have had values.
Steven Herbin
SNH Computing Corporation
Swan Lake, NY