I'm trying to count the number of unique invoice codes in table. The codes are numbers, but it might by that the field is a text field. I'm not sure how to check that.
When I run this code:
SELECT
count(DISTINCT DAB050.REC_LIST) as invoice_number
from "DAB050.ADT" DAB050
WHERE DAB050.BUCH_DATUM = '2021-02-16'
I get the error:
[sql_Query: Error 7200: AQE Error: State = S0000; NativeError = 2124; [iAnywhere Solutions][Advantage SQL Engine]Invalid operand for operator: COUNT]
Not really sure how to solve this. Any tips?