August 31, 2008 at 6:51 pm
Hi,
I have some problem in Conditional Split Task in SSIS.
Suppose, I want to find the customers whose name starts with "ab" then I can use the SQL Query like this " SELECT * FROM Customers WHERE ContactName LIKE "ab%". But I have to use the Stored Procedure as a OLE DB Data Source. I have the permission to use the Stored Procedure but I cann't edit the Stored Procedure.
But in the Conditional Split Transformation in SSIS, it doesn't support the LIKE functions.I want to manipulate the same logic in Conditional Split Task. I want to filter those records whose name starts with "ab" in Conditional Split Trasnformation.
Please help me as soon as possible.
September 1, 2008 at 12:10 am
use SUBSTRING function
SUBSTRING(name,2,2) = 'ab'
Hope it will work out...
Thanks!
September 1, 2008 at 4:34 am
The substring functio should be:
SUBSTRING(name,1,2) = "ab"
In a more general way the FINDSTRING function might be usefull:
FINDSTRING(name, "ab", 1) == 0
You can also use the LEFT function in this case.
September 1, 2008 at 10:25 am
Thanks ...
Its work out.
Thank you very much,....
Regards,
Ketan
July 21, 2010 at 6:58 am
xanthos (9/1/2008)
The substring functio should be:SUBSTRING(name,1,2) = "ab"
Actually, the substring function should be SUBSTRING(name,1,2) == "ab".
If you use a single = sign, SSIS assumes you are assigning a value to something. == is the true conditional test of whether or not something equals another value.
Good catch on the single quote problem of the previous poster.
EDIT: I know this is an old thread, but I added my bit in here in case anyone else comes across this thread in a GOOGLE search and tries to use the solution in their package.
February 7, 2012 at 11:21 pm
findstring(character expression,string,occurance)!=-1
wat does the condition specifies here.
February 8, 2012 at 12:48 am
banu2316 (2/7/2012)
findstring(character expression,string,occurance)!=-1wat does the condition specifies here.
That's a tautology (aka always true).
-1 is never returned by the findstring function, so this expression always yields true.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
February 8, 2012 at 1:20 am
Koen Verbeeck (2/8/2012)
banu2316 (2/7/2012)
findstring(character expression,string,occurance)!=-1wat does the condition specifies here.
That's a tautology (aka always true).
-1 is never returned by the findstring function, so this expression always yields true.
Actually, I think you might be thinking of the word truism.
Tautology is where you say the same thing twice when once is enough - eg, any sentence containing "and also" or "opening gambit."
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
February 8, 2012 at 2:00 am
Phil Parkin (2/8/2012)
Koen Verbeeck (2/8/2012)
banu2316 (2/7/2012)
findstring(character expression,string,occurance)!=-1wat does the condition specifies here.
That's a tautology (aka always true).
-1 is never returned by the findstring function, so this expression always yields true.
Actually, I think you might be thinking of the word truism.
Tautology is where you say the same thing twice when once is enough - eg, any sentence containing "and also" or "opening gambit."
You are referring to the rhetoric tautology, I'm referring to the logic tautology.
a tautology is a formula which is true in every possible interpretation
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
February 8, 2012 at 2:19 am
Koen Verbeeck (2/8/2012)
Phil Parkin (2/8/2012)
Koen Verbeeck (2/8/2012)
banu2316 (2/7/2012)
findstring(character expression,string,occurance)!=-1wat does the condition specifies here.
That's a tautology (aka always true).
-1 is never returned by the findstring function, so this expression always yields true.
Actually, I think you might be thinking of the word truism.
Tautology is where you say the same thing twice when once is enough - eg, any sentence containing "and also" or "opening gambit."
You are referring to the rhetoric tautology, I'm referring to the logic tautology.
a tautology is a formula which is true in every possible interpretation
The day has just begun (coffee #1!) and I've learned something new - thanks!
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
February 8, 2012 at 2:25 am
And I learnt about truism! :w00t:
(yes dear OP, we are spamming your mailbox with useless notifications :-D)
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply