Hi friends,
I have a problem with a grid.
I did one with SQL request to MySQL.
The query is:
"SELECT c.Customer, c.Name, c.Adress_1, c.Adress_2, c.Zip_Code, c.City, …, COUNT(*) as Nombre FROM db_access i LEFT JOIN db_customer c ON i.Customer = c.Customer GROUP BY i.Customer"
In the top of my grid, I put filters.
It works find with all of them, but if I when to filter on Customer, I have an error message about "Couldn't execute query. Column 'Customer' in where clause is ambiguous"
If I change my query to:
"SELECT c.Customer as Customer, c.Name, c.Adress_1, c.Adress_2, c.Zip_Code, c.City, …, COUNT(*) as Nombre FROM db_access i LEFT JOIN db_customer c ON i.Customer = c.Customer GROUP BY i.Customer"
The problem still the same.
If I put:
"SELECT c.Customer as MyCustomer, c.Name, c.Adress_1, c.Adress_2, c.Zip_Code, c.City, …, COUNT(*) as Nombre FROM db_access i LEFT JOIN db_customer c ON i.Customer = c.Customer GROUP BY i.Customer"
In this case the message says that MyCustomer doesn't exist in my database.
Does someone could help me?
Thanks.
Robby