I’ve got contents of a txt file that I’d like to use to write back to a SQL table, or compare against a SQL query.

Is there a way to compare the contents of a dataset against a SQL query? Can you compare contents of two datasets like a join?

If not, 
Is there anyway to insert characters or a string before and after each row in the text file?

i’ve experimented with csv to dataset and looping the dataset to write to another file, but i was trying my goal is to bypass looping dataset if possible. If the dataset could have 1000s of rows so the looping would take some time. 

Sample from txt file row 
1|0|2|usa|20.00
1|2|1|canada|10.00

Want to become 
select all ‘1’,’0’,’2’,’usa’,’20.00’ union all
select all ‘1’,’2’,’1’,’canada’,’10.00’ <—- no “union all” in last row