473,406 Members | 2,847 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

SSIS import full text from html or combine rows

Hi

I'm pretty new to SSIS and I wonder if you could help me.

I download HTML files (thounsands) as text files using SSIS and then using foreach loop I load each file into table text data type field. Works great apart from that some files appear on multiple rows I presume SSIS thinks there is a new record but there isn't as I want to load the whole file into the table text data type field.

So I have two questions:
1) How to import text file in full?
2) If there isn't a reliable way to do point 1 is there an easy way to combine several rows into one? (The table contains text data type field with html code + extra field FileName so files in multiple rows have the same filename)

Many thanks in advance.
Emil
Sep 25 '09 #1
4 5248
Hi

I have decided to do it using a cursor which should work fine but i have a problem to insert (insert into) a row with more then 43679 characters. It works perfectly with nvarchar(max) <= 43679 characters but it inserts NULL if it is above it.

That might be also the reason why the SSIS import text file is split into multiple lines.

The table field is text (I tried nvarchar(max)) and the variable is nvarchar(max) as i couldn't use text. I've tried all possible ways and cannot seem to be able to resolve it.

Many thanks in advance for any information
Regards
Emil
Oct 27 '09 #2
ck9663
2,878 Expert 2GB
1. Check if there are line terminator that could serve as record terminator.
2. Create a table with single column with enough space for that record.
3. Store the entire table as XML (max size: 2G).
4. Parse the XML

Good luck!!!


--- CK
Oct 27 '09 #3
Hi Ck

That sounds like a way to go.

Quick question. In the past I come across an issue where I was exceeded row size but I was getting error and now I don't. Another thing I noticed is that when I use a cursor to merger the rows before I insert them I used print and it printed everything on my screen but it seems doesn't insert it.... Is it possible that it inserts it but cannot display it?

Many thanks
Emil
Oct 29 '09 #4
I've checked the text file and it is 46kb and proper one is 90kb but after taking out rubbish it is 4k so I think I will just clean each row and then merge it.

That should work for me.

Thanks for the respone.

Regards
Emil
Oct 29 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: jqq | last post by:
W2k3 server, SQL 2005. @@version = Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1) I'm trying to set up my first SSIS...
11
by: panic attack | last post by:
Hello everbody, Our system is using Sql Server 2000 on Windows XP / Windows 2000 We have a text file needs to be imported into Sql Server 2000 as a table. But we are facing a problem which is,...
1
by: SQLNewbie | last post by:
Hi all, New to SQL Server - trying to create an SSIS package that will look for and import a series of Visual Foxpro tables (.DBFs) when they appear in a folder. The tables are/can be all...
1
by: Eric | last post by:
In MS Excel, the ability exists to run a "web query." This function is accessed via the data menu's import external data option. The web query wizard accepts a URL address, and then is able to...
0
by: fboweb.com | last post by:
Hey there! I have a DTS import package from an old SQL server that takes flat text files, does some munging on the columns using ActiveX scripts and imports those flat files to various tables. ...
0
by: Silly Milly | last post by:
Calling ALL SSIS GURUS I am trying to import identical MDBs (Access Database) columns into SQL Server 2005 using foreach loop in SSIS. The data and file name of the MDBs are not the same; however...
3
by: =?Utf-8?B?TWljaGFlbA==?= | last post by:
Hi, I need to call an SSIS package from ASP.NET 2.0 web page. First I triy to call it directly from the asp.net page, as the following: Dim app As New Application Dim pack As Package =...
9
by: gelangov | last post by:
I have 2 variables, one is the column name of the table and the other one is the table name and I need to write this in the "Execute SQL task" of a "For each loop" container in a ssis package like...
6
by: Romulo NF | last post by:
Greetings again to everyone, Im back to show this grid componenet i´ve developed. With this grid you can show the data like a normal table, remove the rows that you need, add rows, import data,...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.