Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
karthika9
Starting Member
8 Posts |
Posted - 2009-10-27 : 11:55:16
|
Hi all,Can any one suggest me any other way of removing the blank or all null value rows without using SQL Task as I am getting the file in the format of flat file and I have generate a exceptional report of the invalid data so I can’t implement the sql execute task after sending the data into table. So If any one have any suggestion please let me know using any of the data flow transformations other than OLE DB Command. Thank you in advance. |
|
YellowBug
Aged Yak Warrior
616 Posts |
Posted - 2009-10-27 : 11:58:22
|
Have a look at the "Conditional Split" component |
 |
|
karthika9
Starting Member
8 Posts |
Posted - 2009-10-27 : 12:34:59
|
Hi, I tried in that way but I have around 50 columns and I have to check condition for both blank space and null so the condition will be some what like (X=="" ||X=="NULL") so like this I have to do for 50 columns with && condition....I am getting an error as Out-Of-Memory when I am going this way.....so actually I am stuck at this point.... |
 |
|
YellowBug
Aged Yak Warrior
616 Posts |
Posted - 2009-10-28 : 06:37:11
|
This sound a bit odd. Why do you need to check evey column? Is it sufficient to check just the key columns?Here's a few other suggestions:Maybe you can pivot the values and then exclude the blanks/null.Or if you are familiar with perl/python, it may be easier to manipulate the file there.Or take the data into a staging table, and extract the valid rows into a new flat file for further processing. |
 |
|
smeeluv
Starting Member
20 Posts |
Posted - 2009-10-28 : 08:06:49
|
I like Yellowbug's 3rd suggestion. Load that flat file to a temp/staging table. Add another data flow to send all the records with null values to an error file. Then you use SQL task to load all the clean records into your system. |
 |
|
|
|
|