What's the best way to read a text file using T-SQL? I've seen the BULK INSERT and many different functions but non of them are what I'm looking for.
I need to read each line in the text file and then insert it into a table with some other information like filename, filelocation, status, record date & time created, etc.
The BULK INSERT does not allow me to add extra field unless I'm missing something on this.
Any help or pointing the right direction will be really appreciate it.
See Question&Answers more detail:os