I have a list of 6700 IDs, stored in an Excel file, that I want to search in the Database. I have a query like this:
select distinct RespondentID, QuestionID,Condition
from RespondentProfiles (nolock)
where RespondentID in (10286334,13988335, 18834444,26134155, 8658775)
and QuestionID in (113)
And my IDs are the RespondentIDs above, they look like thus:
10286334,
13988335,
18834444,
26134155,
8658775,
1616806,
3470656,
30981782,
29302573,
29043779,
12899462,
7420528,
17040183,
26129711,
19542507
Excel says that it can save as comma-separated values. But I wasn't able to do this(i.e I want a text file with all the values, comma-separated) then I'd cut & paste into the query. Which would look a bit ugly no-doubt but I think it's feasible, or is it too slow?
thanks!