How to load zipped text file ?

  • Hello Experts,

    Is there a way to load a zipped textfile in sql server 2008 directly without unzipping it?

  • well it depends.

    if load = put the binary of the zip file into an IMAGE/varbinary(max) column, then that's possible.

    if load dmeans open the zip/get the(one or more files!) from the zip, then BULK insert the text of the file into some tables, then no, you have to do that outside of SQL, maybe with a CLR or SSIS.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • I am looking for the second option. There is only one text file which is zipped and I want to unzip it on the fly and load it in to the sql sever table.

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

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