Here is the deal.
I have 2 databases. One is older and has expanded data. The other is newer and has less relevant data. They both share the same products just one has more data.
I've begun a project where I want to expand the newer database to include some of the missing data that exists in the older one. Problem is the IDs don't match up between the databases. So I'm having to search by names. Which may or may not be the same case. The queries in visual studio are DEFINITELY case sensitive. I tested this and I am sure.
So my first thought was to do a like search with a lower function. Like this:
WHERE lower([Name1]) LIKE lower('%Name2%')
but when I went to run it it gave me an error. And visual studio automatically tried to change the syntax of the statement to this:
WHERE 'lower'([Name1]) LIKE 'lower'('%Name2%')
I could have sworn lower() was the right syntax. And I can't find anywhere on google saying any alternatives or why visual studio wouldn't like it. In fact I just tried a similar line in SQL Management Studio and it worked. Why is it not working in Visual Studio?