SQL Statement: Case sensitive - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

SQL Statement: Case sensitive

When I installed my SQL Server 2000, I was asked to set Case Sensitive. Now, I got a problem as follow.

When I query the Student name list, my SQL Statement would be:

Sql = SELECTE * FROM T_Student Where StudentName LIKE '%" & strSearchName & "%'"

When the user type john in the box, namely, strSearchName, it returns nothing; if it is John, it then returns the records that state in the database.

Question to you: How could I get john or JOHN as the same as it is John, meaning that turn case sensitive to case insensitive for searching?

Please note that the field StudenName is formatted as LastName,FirstName. For example, Smith,John.

Any prompt response to my question is greatly appreciated.

Comments

Sign In or Register to comment.