April 21, 2009 at 8:42 am
In my control flow I want to load 100 rows from my source table to my target table. (I need to retain the identity column value)
The rows are defined w/ a PK (identity column) with the values 1-100
I want to bypass the source row w/ PK=88 ---- How do I do this in my control flow?
thx in advance
April 21, 2009 at 9:10 am
I edited my Data Flow and added a Conditional Splite inbetween my Source & Target tables..
Within the Conditional Split Transformation editor, I dragged my PK column name down into the "Condition" block then dragged teh == operator next to my PK column name and specified
UserID == 88
THis row was then EXCLUDED from the source to target transformation
April 21, 2009 at 5:17 pm
Or, depending on the nature of your source, you could have used 'SQL Command' as your data access mode and added a suitable WHERE clause to exclude the unwanted data.
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
April 22, 2009 at 4:06 am
thanks Phil.. Question: Where is the 'SQL Command' icon? How would I go about using this method?
April 22, 2009 at 5:24 pm
On your dataflow, if your source is DataReader, Excel or OLE DB, you have the option of setting the SQL Command property within that source.
In your case, set it along the lines of
Select Field1, Field2, ..., Fieldn
From Table
Where PK 88
and you're good to go.
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
April 23, 2009 at 6:16 am
OK -- feeling like a true novice here. When I drill into my Data Flow, I have: 1 SOURCE table --> flowing to 1 TARGET table. (I'm using 2 predefined OLE DB conections defined in Connection Managers)
When I expand PROPERTIES for any of the 5 objects ---
1. Source Connection manager
2. Target Connection Manager
AND/OR the actual 3 Data Flow objects:
3. SOURCE data flow component
4. data flow path
5. TARGET data flow component
I still don't see where I can enter the SQL & predicate(s). Can you tell me exactly where the PROPERTIES option exists -- so I can modify?
once again - thx in advance
April 23, 2009 at 6:21 am
Just found it.. as you mentioned, it's on the "source" DATA FLOW component... under Properties look for:
-Custom Properties
-- Access Mode (drop down & select SQL COMMAND -instead of OpenRowSet)
-- and finally entering the SQLCommand (last Property under Custome Properties)
thx again for the lead here Phil.. Much appreciated.
April 23, 2009 at 6:56 am
It's always easier to find something when you know roughly where it is:-D Glad I could help.
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 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply