How should I write query which can dynamically add variable/s inside its statement?
the relevant part of the query is...
WHERE companyname IN ( [I]list of company names[/I] )
the rests of your solution depends on whichever application language you're using -- asp, php, whatever
please re-ask the question in the appropriate forum