Error between unicode and non-unicode string data types!

  • Columns = 18

    Rows = 547

    Would it be worth looking into Format File to Bulk Import Data?

  • There are only 17 columns in the sample you posted earlier.

    In your shoes, I'd create a new file containing the first row from your flat file, copied down say 20 times, and try importing. Post the line here also. Then you know for sure if it's something in the file, or a quirk of the importer.

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

  • Right I have done what you have suggested and it worked:

    The following is my TEST flat file:

    borg_code,active_flag,bfun_code,bodd_group_code,clty_code,cmpy_code,credit_man_flag,crr_netting_flag,dflt_prio_code,

    dispatch_days,lndring_review_date,money_lndring_status,registered_indicator,statement_ind,swift_names_reqd_flag,thresh_risk_pcnt,

    tmsn_mech_code,old_ref_code

    ABC 9001,N,TRD,,,INVESTEC_UK,N,N,,,,,,,N,,,

    ABC 9002,N,TRD,,,INVESTEC_UK,N,N,,,,,,,N,,,

    ABC 9003,N,TRD,,,INVESTEC_UK,N,N,,,,,,,N,,,

    ABC 9004,N,TRD,,,INVESTEC_UK,N,N,,,,,,,N,,,

    ABC 9005,N,TRD,,,INVESTEC_UK,N,N,,,,,,,N,,,

    ABC 9006,N,TRD,,,INVESTEC_UK,N,N,,,,,,,N,,,

    ABC 9007,N,TRD,,,INVESTEC_UK,N,N,,,,,,,N,,,

    ABC 9008,N,TRD,,,INVESTEC_UK,N,N,,,,,,,N,,,

    ABC 9009,N,TRD,,,INVESTEC_UK,N,N,,,,,,,N,,,

    ABC 9010,N,TRD,,,INVESTEC_UK,N,N,,,,,,,N,,,

    ABC 9011,N,TRD,,,INVESTEC_UK,N,N,,,,,,,N,,,

    ABC 9012,N,TRD,,,INVESTEC_UK,N,N,,,,,,,N,,,

    ABC 9013,N,TRD,,,INVESTEC_UK,N,N,,,,,,,N,,,

    ABC 9014,N,TRD,,,INVESTEC_UK,N,N,,,,,,,N,,,

    ABC 9015,N,TRD,,,INVESTEC_UK,N,N,,,,,,,N,,,

    ABC 9016,N,TRD,,,INVESTEC_UK,N,N,,,,,,,N

    ABC 9017,N,TRD,,,INVESTEC_UK,N,N,,,,,,,N

    ABC 9018,N,TRD,,,INVESTEC_UK,N,N,,,,,,,N

    ABC 9019,N,TRD,,,INVESTEC_UK,N,N,,,,,,,N

    So.... it must be somthing within my csv file?

    Cant find nothing wrong....

  • The last four rows in your list appear to be 3 columns shorter than the previous rows - is this real or an artifact?

    You could identify which row(s) are responsible by "divide and conquer" - take the first half of the file, if it's not in there, then it's in the second - take half of that etc etc. That will only tell you exactly what's causing the problem. You need a workaround.

    Without the luxury of SSIS to play with, I'd suggest using an alternative provider for the source file, failing that, use bulk import as you suggested earlier.

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

Viewing 4 posts - 16 through 19 (of 19 total)

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