Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. SSIS for Fixed Length line

SSIS for Fixed Length line

Scheduled Pinned Locked Moved C#
sql-serverregexquestionannouncement
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nitin_ion
    wrote on last edited by
    #1

    I have a file in which each line has a fixed length 1600 char but each line has its there are different columns Line 1 will be like this RA01XYZ--------------------------------------------------------------------201401231 RA is Record Type 01 is Version XYZ------------------ is client name 201401231 is date now 2 line SR0123456789-------------------------011234567890- SR is record type 0123456789------------------------- is some number You see that each line will have its own set of defined columns and it cannot be fixed width So my question is, is it possible/advisable to apply SSIS on this or create a simple win form application using REGEX to extract and process the data.

    B 1 Reply Last reply
    0
    • N nitin_ion

      I have a file in which each line has a fixed length 1600 char but each line has its there are different columns Line 1 will be like this RA01XYZ--------------------------------------------------------------------201401231 RA is Record Type 01 is Version XYZ------------------ is client name 201401231 is date now 2 line SR0123456789-------------------------011234567890- SR is record type 0123456789------------------------- is some number You see that each line will have its own set of defined columns and it cannot be fixed width So my question is, is it possible/advisable to apply SSIS on this or create a simple win form application using REGEX to extract and process the data.

      B Offline
      B Offline
      Bernhard Hiller
      wrote on last edited by
      #2

      Regex? No, Substring(start, length). Read a whole line, determine the "line type", and then get its data into appropriate objects which you then insert into the db.

      M N 2 Replies Last reply
      0
      • B Bernhard Hiller

        Regex? No, Substring(start, length). Read a whole line, determine the "line type", and then get its data into appropriate objects which you then insert into the db.

        M Offline
        M Offline
        Marco Bertschi
        wrote on last edited by
        #3

        Bernhard Hiller wrote:

        get its data into appropriate objects

        Which he may do by using an appropriate regex, so not a really bad start.

        Clean-up crew needed, grammar spill... - Nagy Vilmos

        1 Reply Last reply
        0
        • B Bernhard Hiller

          Regex? No, Substring(start, length). Read a whole line, determine the "line type", and then get its data into appropriate objects which you then insert into the db.

          N Offline
          N Offline
          nitin_ion
          wrote on last edited by
          #4

          ok, but i want a view on processing this type of file using ssis?? is it doable and advisable

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups