>>YEAR is not unique and must be qualified.
>>
>>I get the above error msg when running the following code...
>>
>>SELECT ;
>> A.Invoice, ;
>> ShipDate, ;
>> Oslsm, ;
>> Prodct, ;
>> Cust, ;
>> QtyOrd, ;
>> Oprice, ;
>> QtyUpd, ;
>> Ocompc, ;
>> A.ShipDue, ;
>> Terr, ;
>> WrHse, ;
>> Scity, ;
>> Sstate, ;
>> A.Year, ;
>> A.Month ;
>>FROM ;
>> OrdrDtlH A, OrdrHdrH ;
>>INTO TABLE ShipHst ;
>>WHERE ;
>> A.Invoice = OrdrHdrH.Invoice .AND. ;
>> Year = '1999' .AND. ;
>> Month = '12'
>>
>>Yes, even though it seems odd, Year and Month are Character fields.
>>Haven't been able to resolve problem. Would appreciate any help. TIA, Chuck
>
>Change your Where clause to:
>WHERE ;
> A.Invoice = OrdrHdrH.Invoice .AND. ;
> A.Year = '1999' .AND. ;
> A.Month = '12'
>
>or
>WHERE ;
> A.Invoice = OrdrHdrH.Invoice .AND. ;
> OrdrHdrH.Year = '1999' .AND. ;
> OrdrHdrH.Month = '12'
>
>Whichever is applicable. The SQL error is due to an unresolved reference, it doesn't know which Year field to use for the selection.
That did it! Thanks.
Chuck Henry