|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, July 20, 2012 10:45 AM
Points: 4,
Visits: 226
|
|
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.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Saturday, July 31, 2010 11:58 AM
Points: 147,
Visits: 249
|
|
use SUBSTRING function
SUBSTRING(name,2,2) = 'ab'
Hope it will work out...
Thanks!
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Tuesday, June 11, 2013 5:23 AM
Points: 267,
Visits: 624
|
|
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.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, July 20, 2012 10:45 AM
Points: 4,
Visits: 226
|
|
Thanks ...
Its work out.
Thank you very much,....
Regards,
Ketan
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 9:57 AM
Points: 6,724,
Visits: 5,796
|
|
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.
Brandie Tarvin, MCITP Database Administrator, MCDBA, MCSA
Webpage: http://www.BrandieTarvin.net LiveJournal Blog: http://brandietarvin.livejournal.com/ On LinkedIn!, Google+, and Twitter.
Freelance Writer: Shadowrun Latchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, March 08, 2012 11:02 PM
Points: 2,
Visits: 16
|
|
findstring(character expression,string,occurance)!=-1
wat does the condition specifies here.
|
|
|
|
|
SSCrazy Eights
        
Group: General Forum Members
Last Login: Yesterday @ 6:30 AM
Points: 9,410,
Visits: 6,495
|
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 2:19 PM
Points: 4,324,
Visits: 9,665
|
|
Koen Verbeeck (2/8/2012)
banu2316 (2/7/2012) findstring(character expression,string,occurance)!=-1
wat 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."
____________________________________________________________________________________________
Help us to help you. For better, quicker and more focused answers to your questions, consider following the advice in this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
|
|
|
|
|
SSCrazy Eights
        
Group: General Forum Members
Last Login: Yesterday @ 6:30 AM
Points: 9,410,
Visits: 6,495
|
|
Phil Parkin (2/8/2012)
Koen Verbeeck (2/8/2012)
banu2316 (2/7/2012) findstring(character expression,string,occurance)!=-1
wat 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
How to post forum questions. Need an answer? No, you need a question. What’s the deal with Excel & SSIS?
Member of LinkedIn. My blog at LessThanDot.
 MCSA SQL Server 2012 - MCSE Business Intelligence
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 2:19 PM
Points: 4,324,
Visits: 9,665
|
|
Koen Verbeeck (2/8/2012)
Phil Parkin (2/8/2012)
Koen Verbeeck (2/8/2012)
banu2316 (2/7/2012) findstring(character expression,string,occurance)!=-1
wat 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!
____________________________________________________________________________________________
Help us to help you. For better, quicker and more focused answers to your questions, consider following the advice in this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
|
|
|
|