September 1, 2010 at 5:43 am
Hi,
i have attached notepad file. i have one problem , how can i read the notepad file in sql server 2005.
Please reply.
September 1, 2010 at 6:24 am
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
September 1, 2010 at 8:54 am
Does this help you?
SELECT BulkColumn FROM OPENROWSET (BULK 'C:\test.txt', SINGLE_CLOB) AS Z
September 2, 2010 at 9:26 pm
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