• urso47 (12/25/2012)


    Thanks Jeff,

    I will use a directory at:

    C:\Temp\Eq_files\Eq_sample_1.csv and Eq_sample_2.csv

    C:\Temp\sync_files\sync_sample_1.csv and sync_sample_2.csv

    C:\Temp\pcut_files\pcut_sample_1.csv and pcut_sample_2.csv

    C:\Temp\sm_files\V151110456_print.csv and V1511100466_print.csv

    All the files are zipped in a folder (sample files, table structure image and t-code). Pcut_files and sm_files have headers. Eq_files have a big length problematic field.

    For the pcut_files, the first header row is unnecessary. If possible, I would like to have an Identity field with an Identity Increment for all those tables.

    I tried CREATE TABLE t_eq_temp then BULK INSERT on it in order to SELECT INTO t_equitrac table but it didn't work, I can't even remove the double quotes, and the cDocumentName field gets truncated... For the eq_sample_1.csv a BULK INSERT works with all fields as VARCHAR (MAX) but, I still have the unnecessary double quotes and the sDocumentName gets splited and part of it goes to the next fields. The real files have more than 100k rows, I can send you by e-mail if you prefer. Is there a way to avoid duplicated rows in case I try to insert the same file over again?

    All files are in original format now, and to be honest, I didn't even imagine that we would go this further with this help and I am very glad for that.

    Many Thanks again!

    Andre

    I need the CREATE TABLE statements for each of these file types. JPG's won't do me any good. I need the code itself. You can save it TXT or SQL files. Either is fine with me.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)