Can't QueryUnknown column 'p.Code' in 'on clause'