case sensative search

bhushan98's Avatar, Join Date: Jan 2007
Light Poster
hi everyone

I want to have case sensative serarch

as
northwind-employees table

select * from employees where firstname = "Nancy"

and
select * from employees where firstname = "NANCY"

should not fetch same results


please help me.

it is very urgent
0
pradeep's Avatar, Join Date: Apr 2005
Team Leader
Use the Strcomp() function

Code: SQL
SELECT * FROM employees WHERE StrComp(firstname, "Nancy", 0)

Code: SQL
SELECT * FROM employees WHERE StrComp(firstname, "NANCY", 0)
0
bhushan98's Avatar, Join Date: Jan 2007
Light Poster
Sorry It dosen't work, It fetch all the records from the table.
0
pradeep's Avatar, Join Date: Apr 2005
Team Leader
Try using this query

Code: SQL
SELECT * FROM employees WHERE StrComp(firstname, "NANCY", 0)=0
0
bhushan98's Avatar, Join Date: Jan 2007
Light Poster
Thanks a lot I think Its working.

Many thanks for co-operation

neeraj
0
pradeep's Avatar, Join Date: Apr 2005
Team Leader
The pleasure is all mine!
0
bhushan98's Avatar, Join Date: Jan 2007
Light Poster
Pradeep Ji, Please help me once again

how to solve this problem with strcomp.. as I using Like funciton in the query
Tis is a sql query mentioned in vb module --
srtext - variable
select * from data where strcomp(trim(userike '" & Trim(srtext) & "%',0)=0


thanks in advance.
0
bhushan98's Avatar, Join Date: Jan 2007
Light Poster
sorry the query was :
"select * from data where trim(hindi) like '" & Trim(srtext) & "%'"

sorry of inconvinence