?
Solved

SSIS Lookup transformation with ignore case

Posted on 2008-10-14
4
Medium Priority
?
1,033 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

719 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