473,386 Members | 1,699 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,386 software developers and data experts.

Need help with VB.NET and SSIS. I Have 0 Knowledge of VB.NET

HI everyone.
I need to make a Task Script in SSIS that can read s CSV FILE and then modified it.
In the last column the person who write the information add some NEWLINES so some information is added in another row.
I need to read the file, found the rows with the problem and rewrite it with the lost information and delete the rows with problems



As you can see the text in the row 5502 should be in the last column of the row 5501 and then delete the row 5502
Dec 9 '16 #1

✓ answered by codegazer

I'm not here to write code for you, but I'm happy to point you in the right direction. (see below)

It gets more slightly more complicated if you need to append something to the previous line as per your example, but this should get you started. Have a go - people will help more if you will try.

Something on the lines of. . . .

Expand|Select|Wrap|Line Numbers
  1.  
  2. Open filename1 for input as #1
  3. open filename2 for output as #2
  4.    While not EOF(1)  
  5.       read line from file1
  6.       if line is ok
  7.          write line to file2
  8.       else
  9.          ignore
  10.       end if 
  11.    wend
  12. close #1
  13. close #2
  14.  
  15.  

4 1311
I'm afraid you're taking slightly the wrong view.
You can't move data and then 'delete row 5502'. This is a CSV file and all you do is to read the file, check each line in turn, adjust the data if need be, then write the file back to disk. You won't delete a row, you just won't write an empty one.
Dec 11 '16 #2
Thank for the answer :)
There is way to read the file make some IF or FOR that ignore the row when this have less than X characters and then copy all the rows to a new file ?
Dec 12 '16 #3
I'm not here to write code for you, but I'm happy to point you in the right direction. (see below)

It gets more slightly more complicated if you need to append something to the previous line as per your example, but this should get you started. Have a go - people will help more if you will try.

Something on the lines of. . . .

Expand|Select|Wrap|Line Numbers
  1.  
  2. Open filename1 for input as #1
  3. open filename2 for output as #2
  4.    While not EOF(1)  
  5.       read line from file1
  6.       if line is ok
  7.          write line to file2
  8.       else
  9.          ignore
  10.       end if 
  11.    wend
  12. close #1
  13. close #2
  14.  
  15.  
Dec 13 '16 #4
Thanks, you really help me a lot!!
I was doing something like that but with your help i can make it better.
Thanks again
Dec 13 '16 #5

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

Similar topics

0
by: Adam Haskell | last post by:
Ok heres the situation: We have a linked server from SQL 2000 to a foxpro dbf. In our test enviroment we had the Foxpro and SQL server on the same machine. The linked worked perfect. Now we are...
8
by: Woodsrunner | last post by:
Not running my own server. My site host says I can use SSIs on my pages. When I try the supposedly "included" info never shows up in any browser I've tried. On pages where info (tags, etc) is...
25
by: Mark | last post by:
I'm just starting out in an introductory ASP.Net course, and am trying to run a simple program but keeping getting an error. I'm running XP, have installed Internet Information Services (5.1) ,...
1
by: Arvind P Rangan | last post by:
Hi, I have created a class library which i need to use in my ASPX file. when i say: Dim mylib As TestLib = new TestLib() it gives me an error saying type required. How do we use a class...
0
by: mortenol | last post by:
Hi, I am trying to connect a MS SSIS package to an AS400/DB2 database, and I experience problem when I hit the "Create Package" button in the "Data Link properties window". I have understood that...
6
by: KG21 | last post by:
Need help i have the source code but don't know how to make it into a program. Any kind hearted people can make the source code and become a run able program? the file is too big... any kind...
1
by: Pete Smith | last post by:
Hi, we are a small vendor of software and would like to extend our website with a support forum and a knowledge base, etc. Can you recommend any ASP.NET components or other tools which are...
0
by: Jules8M | last post by:
I am looking for some free lance consultants who have experience with user requirements and specification design for XML based content management Systems (documentation based, not Web site CMS)...
1
by: efittery | last post by:
I need to modify the following code to handle a vector of pairs of floats. I was just thinking of casting my vector of floats into being a vector of pairs of floats. Alternately, I have...
1
by: tunsnel | last post by:
please i need help. i have a page that has a delay of 5 seconds and after that i want it to load a page but i want both the html code to be on the same page where the delay is. i want to write them...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.