Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

LIKE (Wild Card) Functionality in Conditional Split Transformation Expand / Collapse
Author
Message
Posted Sunday, August 31, 2008 6:51 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, November 14, 2013 11:47 AM
Points: 5, 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.
Post #561815
Posted Monday, September 1, 2008 12:10 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-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!
Post #561862
Posted Monday, September 1, 2008 4:34 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 4:12 AM
Points: 300, Visits: 677
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.
Post #561936
Posted Monday, September 1, 2008 10:25 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, November 14, 2013 11:47 AM
Points: 5, Visits: 235
Thanks ...

Its work out.


Thank you very much,....



Regards,

Ketan
Post #562058
Posted Wednesday, July 21, 2010 6:58 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 8:46 AM
Points: 5,676, Visits: 6,488
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

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.
Post #956317
Posted Tuesday, February 7, 2012 11:21 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, March 8, 2012 11:02 PM
Points: 2, Visits: 16
findstring(character expression,string,occurance)!=-1

wat does the condition specifies here.
Post #1248719
Posted Wednesday, February 8, 2012 12:48 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 12:52 PM
Points: 13,636, Visits: 11,509
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?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1248747
Posted Wednesday, February 8, 2012 1:20 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:52 PM
Points: 5,317, Visits: 12,353
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.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.

It is better to keep your mouth shut and appear stupid than to open it and remove all doubt. (Mark Twain)
Post #1248751
Posted Wednesday, February 8, 2012 2:00 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 12:52 PM
Points: 13,636, Visits: 11,509
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
Post #1248780
Posted Wednesday, February 8, 2012 2:19 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:52 PM
Points: 5,317, Visits: 12,353
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.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.

It is better to keep your mouth shut and appear stupid than to open it and remove all doubt. (Mark Twain)
Post #1248793
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse