Home Forums SQL Server 2005 Development Parsing text file and updating the output to database records RE: Parsing text file and updating the output to database records

  • Thank you GSquared,

    Sorry i could not explain the requirement properly as i has to hurrry..

    Anyways, the text file is a comma-delimited file(csv) with 6 entries(columns) in each row,

    With 'bulk insert' im able to push all the text data into a table.

    But the requirement is not to push the entire data,

    I have to extract 1,2 and 5 columns from the file and enter only those values to a SQL-DB table.(3 columns)

    I have to parse the text file word by word or (character by character) and if "," is arrived at, the value needs to be pushed into DB.

    I don't know how to parse the text file in SQL.

    Can you please help me out as to how i can parse the csv file in SQL??