Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sqlontherun101
Starting Member
16 Posts |
Posted - 2009-08-28 : 03:44:33
|
| Hi, I have the followin select statement: select count(*) Customer where fName = @NameHow do i modify the select statement to fecth teh number of rows with the name in @Name ignoring upper and lower case.there could be two entry such as Assume @Name value is "ruby" and if the data base has two rows one wiht "ruby" and the other with "Ruby", they row count should return as 2. How do i modify the above Query do the above?cheers |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-08-28 : 04:04:37
|
| select count(*) from Customer where lower(fName) = lower(@Name)MadhivananFailing to plan is Planning to fail |
 |
|
|
YellowBug
Aged Yak Warrior
616 Posts |
Posted - 2009-08-28 : 04:05:18
|
| What is the collation of the fName column?Try using a case-sensitive or binary collation. Example:SELECT count(*) FROM Customer WHERE fName COLLATE Latin1_General_BIN = 'ruby' |
 |
|
|
|
|
|