I have a table for example clients with a column as doc_number, and I also have a list of client documents that I dont know if they exist in the client table.
The question is, is there any easy way to get all de the clientes that are in this list and not in the table?
I don't want to use a auxiliary table, thanks!
Best How To :
you can write your own function
CREATE DEFINER=`root`@`localhost` FUNCTION `filter_clients`(InString Varchar(1000)) RETURNS varchar(1000) CHARSET utf8
# loop to divide string list by comma
# select for each string segment
# add result to Outstring.i
and call it later with
SELECT filter_clients('123456, 1234658, 145678')
I wouldn't do that and divide the list in some other language