There are various things you can do here. Import the file into a table and then do the join, use openrowset or opendatasource. Here are a couple of examples.....
SELECT * FROM OPENROWSET(BULK N'C:\MyFlatFile.txt', FORMATFILE = 'format_file_path' ) AS MyFlatFile
BULK INSERT #MyFlatFile
FROM 'D:\MyFlatFile.txt'
WITH
(
FIELDTERMINATOR ='\t',
ROWTERMINATOR = '\n',
FIRSTROW = 2
)