All Forums General
sg0182046 1 post Joined 06/13
16 Oct 2015
Populating multiple values in SQL query from Excel/VBA

My question is related to populating my SQL query values from Excel/VBA.  In my query I have two types of inputs, one for a date, another for a city or list of cities.  The date is working just fine and is populated in Excel as 'YYYY-MM-DD.  I can do the same with a single city as 'MIAMI.  What I can't figure out is how I properly populate multiple cities.  The SQL which works fine in SQL Assistant would normally just read as'MIAMI','CHICAGO') but from Excel I've tried all combinations of single quotes before and after,  with/without comma separation, no quotes, no commas, etc.  Any idea what the Excel format should be for this?
and ca.enddate>=CAST(? AS DATE)
and ta.targetingvalue in (?)

You must sign in to leave a comment.