I'm trying to run a query with a custom built function 'StripNumbers'. This function removes any numbers from a string and returns a string as result.
This works:
The same function with DISTINCT added returns a data type mismatch error.
I get the same error with a GROUP BY clause.
Can anyone help me understand where the problem lies so I can work around it?
This works:
Code:
SELECT StripNumbers(pt.Code2) AS Program
FROM Primary_Transformants AS pt
The same function with DISTINCT added returns a data type mismatch error.
Code:
SELECT DISTINCT StripNumbers(pt.Code2) AS Program
FROM Primary_Transformants AS pt
I get the same error with a GROUP BY clause.
Code:
SELECT StripNumbers(pt.Code2) AS Program
FROM Primary_Transformants AS pt
GROUP BY StripNumbers(pt.Code2)
Can anyone help me understand where the problem lies so I can work around it?