SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


LIKE (Wild Card) Functionality in Conditional Split Transformation


LIKE (Wild Card) Functionality in Conditional Split Transformation

Author
Message
Ketan Patel-664594
Ketan Patel-664594
SSC-Enthusiastic
SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)

Group: General Forum Members
Points: 129 Visits: 235
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.
nkm129
nkm129
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1153 Visits: 249
use SUBSTRING function

SUBSTRING(name,2,2) = 'ab'

Hope it will work out...

Thanks!
xanthos
xanthos
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1588 Visits: 970
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.
Ketan Patel-664594
Ketan Patel-664594
SSC-Enthusiastic
SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)

Group: General Forum Members
Points: 129 Visits: 235
Thanks ...

Its work out.


Thank you very much,....



Regards,

Ketan
Brandie Tarvin
Brandie Tarvin
SSC Guru
SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)

Group: General Forum Members
Points: 91971 Visits: 9544
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 AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
banu2316
banu2316
SSC Journeyman
SSC Journeyman (82 reputation)SSC Journeyman (82 reputation)SSC Journeyman (82 reputation)SSC Journeyman (82 reputation)SSC Journeyman (82 reputation)SSC Journeyman (82 reputation)SSC Journeyman (82 reputation)SSC Journeyman (82 reputation)

Group: General Forum Members
Points: 82 Visits: 16
findstring(character expression,string,occurance)!=-1

wat does the condition specifies here.
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)

Group: General Forum Members
Points: 145700 Visits: 13350
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.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Phil Parkin
Phil Parkin
SSC Guru
SSC Guru (128K reputation)SSC Guru (128K reputation)SSC Guru (128K reputation)SSC Guru (128K reputation)SSC Guru (128K reputation)SSC Guru (128K reputation)SSC Guru (128K reputation)SSC Guru (128K reputation)

Group: General Forum Members
Points: 128237 Visits: 22579
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.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)

Group: General Forum Members
Points: 145700 Visits: 13350
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?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Phil Parkin
Phil Parkin
SSC Guru
SSC Guru (128K reputation)SSC Guru (128K reputation)SSC Guru (128K reputation)SSC Guru (128K reputation)SSC Guru (128K reputation)SSC Guru (128K reputation)SSC Guru (128K reputation)SSC Guru (128K reputation)

Group: General Forum Members
Points: 128237 Visits: 22579
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.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search