I am building a sql statement through a for loop. see below. when it runs I want string selectquery = selectquery + "INTERSECT " + [the next query generated from the for loop] how do I do this?
string selectquery = "";
for (int q=0, a=1, x=2; q < carList.Count && a < dealerList.Count && x < dealerList.Count; q++, a+=4, x+=4 )
carname = carList[q].ToString();
carprice = dealerList[a].ToString();
location = dealerList[x].ToString();
string selectquery = query "SELECT car_name FROM names n, price p, dealer d where name =" + carname + "AND price =" + carprice + "AND dealer =" + location + ";