I want to pass a list of int's (comma separated) which is a field in my table
ie. 1234, 2345, 3456, 4567
to my IN
clause in WHERE
. But the list is a string (VARCHAR
), and I'm comparing to an int field. Is there a way for me to convert the list to list of ints?
Enterprise_ID
is INT
Path is a field in the table which is a comma separated string
ie. 1234, 2345, 3456, 4567
SELECT *
FROM tbl_Enterprise
WHERE Enterprise_ID IN ( Path )
My database is Vertica.
"But the list is a string (VARCHAR), and I'm comparing to an int field"
– Priorate