import log file

  • I need to import a log file into some sort of text field. For connection manager flat file, I set the row delimiter to |, which causes the cr/lf to show as a square in the text field (is there any way to not do this in the text field?). Also, the other problem is I get a truncation error even though I set advanced -> outputcolumnwidth to 240,000 bytes and datatype to string.

    It might look like something like this:

    Connected to ftpserver

    220 Microsoft FTP Service

    User (ftpserver:(none)):

    331 Password required for user.

    230 User userlogged in.

    ftp> get leads.csv

    200 PORT command successful.

    150 Opening ASCII mode data connection for leads.csv(13845 bytes).

    226 Transfer complete.

    ftp: 13845 bytes received in 0.00Seconds 13845000.00Kbytes/sec.

    ftp> quit

    221

    Volume in drive D is Apps

    Volume Serial Number is 36F3-BF5D

    Directory of D:\jobs\leads

    11/11/2009 08:42 AM 13,845 leads_11112009.csv

    1 File(s) 13,845 bytes

    0 Dir(s) 475,202,322,432 bytes free

    Job 'leads' : Step 4, 'count of rows inserted' : Began Executing 2009-11-11 09:00:35

    count of rows imported [SQLSTATE 01000]

    -----------

    159

    (1 rows(s) affected)

    count of those insert into requestquote [SQLSTATE 01000]

    -----------

    158

    (1 rows(s) affected)

    Volume in drive D is Apps

    Volume Serial Number is 36F3-BF5D

    Directory of D:\jobs\leads

    11/11/2009 08:42 AM 13,845 leads_11112009.csv

    1 File(s) 13,845 bytes

    0 Dir(s) 475,202,052,096 bytes free

  • Are you trying to import all the text into a single row in a table?

    If so, OpenRowset with Bulk and Single_CLOB options, might be the better way to go on this.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply