Solved

SSIS Lookup transformation with ignore case

Posted on 2008-10-14
4
1,020 Views
Last Modified: 2013-11-30
Hi experts,

I use the lookup task in SSIS. But the task sarches for exact matches.
I need to make a lookup which ignores cases.
So I tried to change the generated SQL-statement using the modify box in the advanced tab.
I tried to add the LOWER() function to the statement but an error was returned

Any suggestions?
select * from
	(SELECT a.name, k.PLZ,a.vorname,  k.name AS kundenname, k.Nummer , kg.SalesPersonCode
FROM kansprechp AS a JOIN Kunden AS k ON a.KundenCode = k.Code JOIN KundenGr AS kg on k.GrCode = kg.GrCode) as refTable
where LOWER([refTable].[name]) = LOWER(?) and [refTable].[PLZ] = ?

Open in new window

0
Comment
Question by:arthrex
  • 2
  • 2
4 Comments
 
LVL 17

Expert Comment

by:HoggZilla
ID: 22715195
There is nothing wrong with your Syntax, the Lower function will work as you have written. What is the exact error. Are you selecting against a MSSQL db? Do your variable datatypes match the columns in the where clause?
0
 

Author Comment

by:arthrex
ID: 22718543
Thanks for your reply.

The datatypes have to match, because without the Lower() function it works.
Attached you see the exact statement and the error messages.

Thanks
sqlStatement.GIF
errormessage.GIF
0
 
LVL 17

Accepted Solution

by:
HoggZilla earned 500 total points
ID: 22719501
I suggest you delete the lookup component and create a new one, I have been suprised many times to find this as a solution.

Next, add the LOWER for a.name to the SQL on the Reference Table tab. This might fix it for you, if not add create another column in your source query that is a lower case for your paramenter.
0
 

Author Comment

by:arthrex
ID: 22720874
Renewing the shape didn't work. SSIS doesn't seem to support the lower() function for the parameters in the statement (lower(?))
So adding a new column solved the problem. Thanks for the workaround.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question