Large text file encryption per line
Here is the deal. You can do this pretty easily in SQL. Exactly how is off-topic on this site. I'd suggest one of the other SE sites. Maybe StackOverflow or DBA. 

That said, I am writing this as an answer for a reason. My reason is to persuade you to not do it. Here is why, it gives your customers a false sense of security. Your approach to doing the join is to use deterministic crypto, AES in ECB mode or a SHA2 hash of the values in the column. The problem is, there is a one-to-one mapping from original plaintext to ciphertext. So, anyone who knows that mapping will be able to reverse the mapping.

So then the question is, who knows the mapping. Well, you do (and by you I mean your company). So it isn't really doing much to anonymize the data from your prospective. Also,
if you are giving your encryption software to your customers so they can run it on their machines, they can easily figure out the one-to-one mapping by reverse engineering your code (this is especially true if you use something like AES with a fixed key).

So, in short, I would suggest you don't do what you are planning on doing. As to what a better solution to the problem is, I'd suggest asking that as a separate question on here. Start by defining the problem with some examples and make sure you specify exactly what you want to protect and from whom you are protecting it.