Reputation: 99
I have a simple qry that give me error
SELECT *
FROM qry_ExecSum
inner join qry_IDS_IT_Everything on qry_ExecSum.P_Code = qry_IDS_IT_Everything.P_Code
It works good If change the * to column names like this :
SELECT qry_ExecSum.P_Code
FROM qry_ExecSum
inner join qry_IDS_IT_Everything on qry_ExecSum.P_Code = qry_IDS_IT_Everything.P_Code
All individual queries run good!!
Upvotes: 2
Views: 118
Reputation: 227
Hope you are receiving error The multi-part identifier could not be bound
, since both tables have the column named P_Code
.
To avoid this you can specify the table name or table alias infront of the column name in the SELECT
. That is the reason the second query doesn't return the error.
Upvotes: 3