Home Forums SQL Server 2005 Development I am trying to enter a text file in to a database with customer delimiters RE: I am trying to enter a text file in to a database with customer delimiters

  • Thank you for the reply and the recommendation. It is a pretty expensive option but I am starting to think if we need to truly parse the file correctly it might be the only way to go.

    I know I have made several attempts to create something with SSIS and then a SQL custom text function and it has not been working out to well.

    I also thought to try VS with something like this:

    using (TextReader rdr = new StreamReader(fullFilePath))

    {

    string line;

    while ((line = rdr.ReadLine()) != null)

    {

    string[] lineChars=line.ToCharArray();

    foreach(char c in lineChars)

    {

    switch(c)

    {

    case startOfWord1:

    //change the state of word you are populating something like

    // Build(word1)

    case EndOfWord1:

    //Terminate appending to work1 something like

    //write word1 to persistent storage or in memory collection etc abd say Word1 done

    and so on and so forth for other words

    }

    }

    }

    }

    Thanks again for your time I greatly appreciate it.

    The pain of Discipline is far better than the pain of Regret!