Is there any way to use a combination of strings for a MySQL variable?
I know if this is a string of just numbers it isn't a problem, but can I use a SET in this fashion?
mysql> select @SQL_BIND_DOCS;
+-----------------------------------------------------------------------+
| @SQL_BIND_DOCS |
+-----------------------------------------------------------------------+
| '1','2','3','4','5' |
+-----------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> select distinct doc from documents doc where doc in (@SQL_BIND_DOCS);
Empty set (0.01 sec)
mysql> select distinct doc from documents doc where doc in ('1','2','3','4','5');
+---------------------------------+
| doc |
+---------------------------------+
| AA |
| BB |
| CC |
| DD |
| EE |
+---------------------------------+
5 rows in set (0.01 sec)
You can see here that there is no issue with the data -- any help provided would be appreciated.