It's pointless to include thisyear.vlgnr_mut in the result set because it always will be NULL. My query returns all records from the prvious year that are not found in the current year. Is it what you want? If not than please clarify.
>it seems that this doesn't work. I have changed mutbdrg.mijbrpls is null to mutbdrg.vlgnr_mut. I get all the records of the previous year, the strange thing is that if i do the following query on a small set of records I get the nulls of vlgnr_mut of this year:
>
>Select prevyear.*, thisyear.vlgnr_mut as recdeleted from prevyear ;
>left outer join thisyear;
>on prevyear.mijbrpls = thisyear.mijbrpls and prevyear.vlgnr_mut = thisyear.vlgnr_mut
>
>
>
>recdeleted is null for 10 records. But when I do the following :
>
>Select prevyear.*, thisyear.vlgnr_mut as recdeleted from prevyear ;
>left outer join thisyear;
>on prevyear.mijbrpls = thisyear.mijbrpls and prevyear.vlgnr_mut = thisyear.vlgnr_mut and thisyear.vlgnr_mut is null
>
>
>Then all records are set on .null. for the field vlgnr_mut. Is this a bug in vfp5 or am I doing something wrong.....
--sb--