I have to write a SQL Stored Procedure to read a Text file which has few hundred of lines. I dont have to read all the lines. First two lines will have either 04010X098A1~ST (or) 005010X222A1~ST
Based on the file, I need to make an entry in the column whether it is 4010 or 5010.
I am looking for a Syntax similar to this .. I took this from ( https://www.simple-talk.com/sql/t-sql-programming/reading-and-writing-files-in-sql-server-using-t-sql/
Select line from
where line like '04010%'
Attached is the sample file.