| Author |
Topic  |
|
|
itmasterw
Yak Posting Veteran
83 Posts |
Posted - 03/06/2013 : 08:09:03
|
Hi, I am very new to SSIS and trying to learn how to use it, but I formally did do DTS packages. In Dts we would often bring in a text or Excel file and put it into a temporary table. From here we would run sql statements (in a sql component) to filter out cretin things that we wanted. For example, if we had a file that had First name, Last name, address, City, State, and zip code, we could say give me only the records with zip code 15246. This set would then be sent to a permanent table. I am able to bring in the file and move the data to the tabel, but I cannot see to apply SQL to filter. How can I do this in SSIS?
Also, do you have any suggestions as to where, on line, I can go to learn SSIS?
Thank you
ITM |
Edited by - itmasterw on 03/06/2013 08:11:17
|
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47189 Posts |
Posted - 03/06/2013 : 11:45:10
|
you can specify the filter by using conditional task inside data flow task
Add excel source to point to your excel file (or flat file in case of text file), add a conditional task in between to do filtering. Then place a OLEDB destination for inserting data to your table
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
|
itmasterw
Yak Posting Veteran
83 Posts |
Posted - 03/06/2013 : 12:25:32
|
Thanks for your help, but I do not see where you would put a SQL statement to create a filter here.
Thank you
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
[/quote]
ITM |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47189 Posts |
Posted - 03/06/2013 : 12:30:54
|
no sql statement for filter. the expression will be written inside conditional task where you'll have all the fields from the source file available. There you can define an output and write an expression like
ZipCode == 15246
then join this output path to OLEDB destination where you populate the table
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
|
itmasterw
Yak Posting Veteran
83 Posts |
Posted - 03/07/2013 : 07:51:26
|
Well this woudl help but isn't there a way to write sql for really advance filtering? Inthe old DTS packages I was able to write really advance sql statements to query a table; like even using things like CTEs in them. I would be able to use even sql functions like date and string fuctions in Sql statements. There must be a way of ding thei here?
Thank you
ITM |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47189 Posts |
Posted - 03/07/2013 : 09:06:28
|
then you've to do it execute sql task in control flow. SSIS has two engines one for control flow and another for data flow as against common engine in dts
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
| |
Topic  |
|