|
Question : specified field could refer to more than one table listed in the FROM clause of SQL statement
|
|
I'm working with a report based on a query. The query runs fine, but when I run the report, I get an error message saying that the field 'Parent.Parent' could refer to more than one table listed in the FROM clause of my SQL statement.
I want the field 'Parent' to come from the Table 'Parent'
My tables are: 01_FinancialDATA 02_OtherData Stations Parent
I'm also drawing data from a Query Q_1_MbML
The 01_FinancialDATA and 02_OtherData both have a lookup field to 'Station_ID' in the Stations table
The Stations table has a lookup to Parent_ID in the Parent table
I created the query in design view; Here's the underlying SQL SELECT Parent.Parent_ID, Parent.Parent, Stations.Station_ID, Stations.Station, [02_OtherData].[03Format], [01_FinancialDATA].[03TMR], Q_1_MbML.[03TotMR] FROM (((Q_1_MbML RIGHT JOIN 01_FinancialDATA ON Q_1_MbML.Station_ID=[01_FinancialDATA].Station_ID) LEFT JOIN 02_OtherData ON [01_FinancialDATA].Station_ID=[02_OtherData].Station_ID) LEFT JOIN Stations ON [01_FinancialDATA].Station_ID=Stations.Station_ID) LEFT JOIN Parent ON Stations.Parent_ID=Parent.Parent_ID;
Appreciate your help!
|
|
Answer : specified field could refer to more than one table listed in the FROM clause of SQL statement
|
|
avoid using table name as field name.
|
|
|
|