Convert array to string

This is probably a naive question but how do you convert an array of numbers to a comma delimited string that can be read as a variable into a sql query?

Thanks