read notepad file in sql server 2005

  • Hi,

    i have attached notepad file. i have one problem , how can i read the notepad file in sql server 2005.

    Please reply.

  • Hi Grasshopper,

    You're going to struggle to work with the file in the format it's in. SQL needs your data to be organised into discrete entities with rows and columns. Your file is organised with data on alternate rows and has metadata embedded within the data structure itself.

    If it was me, I'd write a VB script to process the data first. But then, I'm a bit old fashioned 🙂

    Regards, Iain

  • Does this help you?

    SELECT BulkColumn FROM OPENROWSET (BULK 'C:\test.txt', SINGLE_CLOB) AS Z

  • irobertson (9/1/2010)


    Hi Grasshopper,

    You're going to struggle to work with the file in the format it's in. SQL needs your data to be organised into discrete entities with rows and columns. Your file is organised with data on alternate rows and has metadata embedded within the data structure itself.

    If it was me, I'd write a VB script to process the data first. But then, I'm a bit old fashioned 🙂

    Regards, Iain

    Thanks for reply.

    Can you please tell me how can i read it by script.

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

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