Column 'P_ID' in where clause is ambiguous