Are these sentences correct:
1-That is a city to invest in.
2-That is a city in which to invest.
3-That is a means to attain your goals.
4-That is a means by which to attain your goals.
I believe them all to be correct. Number 2 is simply to avoid an old rule (now discounted) about not ending a sentence with a preposition. Winston Churchill is credited with the definition of a preposition as "something you should never end a sentence with." [Thus disproving the rule.]
I feel that Number 4 reads more clearly than Number 3, but I wouldn't say that Number 3 is wrong.