Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2002
    Location
    Brazil
    Posts
    56

    Exclamation Unanswered: Importing TEXT File in DTS

    Hello Guys,

    I Hava a Source text connection and I'd like to take just the first row ( the header, of course) of the file to one table. How can I get this??

    Tis is quite Urgent.
    Thanxs;
    Diogo Hudson Dias
    DBA - SQL 6.5/7.0/2000
    ASBACE - ATP

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Does it have to be DTS?

    Why not DTS in to a single column table (varchar(8000)) and the parse out the data in to the final table?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Sep 2002
    Location
    Brazil
    Posts
    56
    Because the text files can be larger than 200MB.
    I need to take just the first Row of the text file to know some important informations.
    Diogo Hudson Dias
    DBA - SQL 6.5/7.0/2000
    ASBACE - ATP

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    You sure you're talking about row size?

    That's a long row.....
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  5. #5
    Join Date
    Sep 2002
    Location
    Brazil
    Posts
    56
    No. Im speaking about the File.

    Look an example of the beggining of the file:
    I want to get the first row of the file and put it into a column. Note, just the first row. You can see that the another lines are in a different layout and would make my table very big.

    A221539 DPVAT - COD BAR 151BANCO NOSSA
    G00000000000000 20040123200401298664000000093373362
    G00000000000000 20040123200401298663000000093383362
    G00000000000000 20040123200401298669000000051623362
    G00000000000000 20040123200401298669000000093383362
    G00000000000000 20040123200401298664000000093383362
    G00000000000000 20040123200401298661000000093383362
    G00000000000000 20040123200401298661000000055433362
    Diogo Hudson Dias
    DBA - SQL 6.5/7.0/2000
    ASBACE - ATP

  6. #6
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Have you looked at BULK INSERT in BOL?

    You can specify first row and last row (ie 1 and 1)
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •