SQL Server Performance

importing pipe delimited files without creating

Discussion in 'ALL SQL SERVER QUESTIONS' started by alvinzaman, Nov 13, 2013.

  1. alvinzaman New Member

    Hi,
    i am looking to import about 40 pipe delimited files, each will have 5 or 6 columns, i dont want to create 40 tables and 200 fields, is there way to import the files without first specifying the table and fields, so that tables and fields are created automatically on the fly as files are importing, also note i am using sql server 2012 express with no SSIS

    any help will be much appreciated

    thanks
  2. davidfarr Member

    To my knowledge, without SSIS, there is no easy way.
    From a text file; your closest 'T-SQL only' solution is using BULK INSERT, but even then you would need to create the destination tables first.

    If you have any experience with programming languages, or if you have access to someone who does; it would take less than one hour to write up a small application or even a simple VBS script file which could loop through each file, read the headers in the first line, dynamically create a new table with relevant column names, parse the delimited values, and import the file contents.
    That would actually be my preferred solution even if I did have SSIS.
  3. AJITH123 Member

    Database==> Task ==> Import data

Share This Page