I'm trying to count the amount of items on a table that have a certain tag on them, coded as a number. I have the numbers I want to count in a txt file, but can't figute out how to take the info from the file directly to my query.
Writing them down the code would look like:
SELECT ID, COUNT(*) FROM table WHERE ID IN ('0102','1123','1314',1340') GROUP BY 1;
And the expected output should be the number of entries that have any of the IDs on the list.
The problem with this approach is that in some cases the amount of IDs is too big. Is there any way to get the IDs from the original file and use them on the query?
Thanks.