S
Steve
Please help me. I have a query to retrive data from a table that I can't change (linked to a secure source) the data type of a text field that I would like to do arithmatic functions on. My query works fine, except when I noticed I was getting unwanted duplicate rows and applied "Distinct" to my select I get the following message. "Data type mismatch in criteria expression". Here is my code
SELECT DISTINCT CUSTOMERS.KeyCustomer, CUSTOMERS.CustomerName, Year([DateInvoiced]) AS [Year], Val(Trim([CustMisc1])) AS [IGC #
FROM CUSTOMERS INNER JOIN ORDERSHIST ON CUSTOMERS.KeyCustomer = ORDERSHIST.KeyCustomer
What am I doing wrong
SELECT DISTINCT CUSTOMERS.KeyCustomer, CUSTOMERS.CustomerName, Year([DateInvoiced]) AS [Year], Val(Trim([CustMisc1])) AS [IGC #
FROM CUSTOMERS INNER JOIN ORDERSHIST ON CUSTOMERS.KeyCustomer = ORDERSHIST.KeyCustomer
What am I doing wrong