SELECT DISTINCT SQL Command Not Available with .CSV Files

I was wondering if this was a known issue or if there is a work around besides changing the file type.

Currently I am trying to read a .CSV file and get all of the Distinct Plate Barcodes. While I can do this with no issue on .xlsx files with .CSV files I’m getting a piacular error on the File: Read command.


SQL Command:
“SELECT DISTINCT SourcePlateLabID FROM [Database_UploadDUMMY#csv]”

File Open Command:

While I am able to use other commands such as SELECT * FROM with .CSV files this DISTINCT command seems to be of issue with the file

@Gellator - For that SQL query to function, the file open command must be structured to only specify the column of interest (where unique records are being requested), as the query can only return distinct values from one column and wont know what to do with the other data fields in the schema.

The same behavior should be observed for both Excel workbooks (.xls and .xlsx) and CSV files.


1 Like

Gotcha, Thank you for the clarification. This makes a lot of sense given that the distinct command is essentially a explicit return that the RunData column has no data to populate it.