locked
Insert data from a plan text file to SQL server script RRS feed

  • Question

  • I have text file which contain huge data of authors and I want to dump this data into SQL Server database table. The file has information of authors such as: Index-ID, Name of author, Affiliation, publication count etc. for example some lines from text file are following

    #index 1#n O. Willum#a Res. Center for Microperipherik, Technische Univ. Berlin, Germany#pc 1#cn 0#hi 0#pi 0.0000#upi 0.0000#t new product;product group;active product;long product lifetime;old product;product generation;new technology; environmental benefit;environmental choice;environmental consequence#index 2#n D. Wei#a Dept. of Electr. & Comput. Eng., Drexel Univ., Philadelphia, PA, USA#pc 1#cn 0#hi 0#pi 0.0000#upi 0.0000#t lowpass filter;multidimensional product filter;orthonormal filterbanks;product filter;new approach;novel approach;challenging problem;iterative quadratic programming;negligible reconstruction error;spectral factorization#index 3#n Wenhu Wu#a #pc 1#cn 0#hi 0#pi 0.0000#upi 0.0000#t MAP adaptation;adaptation data;adaptation utterance;novel speaker adaptation method;speaker adaptation; speaker adaptation model;MAP estimation;speaker independent model;distance weighted regression;model neighbor#index 4#n Zhiyuan Zeng#a College of Geography Science, Nanjing Normal University, Nanjing 210097, China#pc 1#cn 0#hi 0#pi 0.0000#upi 0.0000#t normalized difference vegetation index;ratio vegetation index;vegetation coverage calculation;vegetation fractional coverage;vegetation index;VI-VFC model;VI-VFC modelling;VI-VFC relationship;VI-VFC relationship model;EP choice#index 5#n Erzen Hyko#a Department of Computer Science, University of Düsseldorf, Düsseldorf, Germany 40225#pc 1#cn 0#hi 0#pi 0.0000#upi 0.0000#t information content;Spatio-Temporal Information Content;trajectory information;arbitrary trajectory;discrete trajectory;movement model;movement prediction model;spatio-temporal data;state-of-the art compression scheme;Arithmetic Coding#index 6#n S. Wanstedt#a #pc 1#cn 0#hi 0#pi 0.0000#upi 0.0000#t average quality;speech quality;long samplesSpeech quality;subjective quality;long speech segment;short speech ample;speech form;common objective method;objective measurement;subjective listening test

    So this contain information like #index is author ID, #n is name of author, #a is affiliation, #pc is publication count, and so on #cn, #hi,#pi, #upi, #t also contain values. its means each column name is started with # symbol. I need data in table form.

     #index, #n, #a, #pc, #cn, #hi,#pi, #upi, #t are columns and respective value should be store in respective column 

    help will be appreciated 

    import in excel or SQL is ok 
    Thursday, November 29, 2018 8:06 AM

All replies