>>CGR_IN CGR_OUT DEST ORIGIN TC ANO BNO CODE >>noco120 UK T1-SO3 10 123 456 AB02 >> noco165 UK T1-SO3 20 123 456 AB02 >>>I need an SQL query that combines informations from both records with CODE as the keyfield.
>SELECT A.CGR_IN, B.CRG_Out ; > FROM MyTable A, MyTable B ; > WHERE A.Code = B.Code >The problem comes when the first record is joined to itself and to the second record (and any other records that match the Code value).