January 25, 2011 at 9:08 am
I ahve a flat file and I need to import the file to Excel.
In the flat file there are a bunch of unwanted data.
e.g
-----------------------------------------
ABCD
-----------------------------------------
01-24-2011 SERAIl#
P.SN PAGE 30
----------------------------------------
ITEM ID SERIAL# DATE S Description
----------------------------------------
AB111 77777 01-24-11 I ABCD
CD111 77779 01-12-11 I DDDD
I don't want anything that has
-----------------------------------------
ABCD
-----------------------------------------
01-24-2011 SERAIl#
P.SN PAGE 30
----------------------------------------
ITEM ID SERIAL# DATE S Description
----------------------------------------
in it.
I just want the Column values without the nulls in between.No header.
I am trying to insert these in a sql table. This is coming in as a single column. Then delete from the table anything that has
WHENEVER I try to delete from the table anything that has
-----------------------------------------
ABCD
-----------------------------------------
01-24-2011 SERAIl#
P.SN PAGE 30
----------------------------------------
ITEM ID SERIAL# DATE S Description
----------------------------------------
in it.
When I write
DELETE FROM TableName Where ColumnName Like '%--%' OR
COLUMNName LIKE '%ABCD'
etc . It does not get deleted.
How do I do that.
Then I need to import the good data to Excel.
January 25, 2011 at 4:08 pm
I'm not sure if I'm missing the point here, but wouldn't it be easier to use an Excel-Macro for it?
It just makes me wonder why to use SSIS to convert flat file data into MS Office format... :unsure:
January 26, 2011 at 4:34 am
Or it might be possible via a conditional split (just redirect all the unwanted rows to an unused output and keep the good stuff) - don't use SQL Server at all.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply