Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesI am using a select statement like SELECT ENAME FROM EMPTABLE WHERE ENAME ="vishal" I am getting the result as 1 row affected. Ename ---------- Vishal The Problem is the query I have passed is "vishal"(lower case) and getting the output as "Vishal"(V is Upper Case) How do I solve this problem if I want to go with case sensitive retrival of data. I have gone thru some string functions available but could not find one. Any help would be appreciated.. regards vishal.
Post Follow-up to this messageCheck for the COLLATION in books online. Your setting is obviously CI (case insensitive). If you want just for the query to be case sensitive you can specify collation in the select statement. Check for COLLATE option for this. MC "vishal" < vishalkumarjain@gmai l.com> wrote in message news:1133336001.203540.29810@g47g2000cwa.googlegroups.com... >I am using a select statement like > SELECT ENAME FROM EMPTABLE WHERE ENAME ="vishal" > > I am getting the result as 1 row affected. > > Ename > ---------- > Vishal > > > The Problem is the query I have passed is "vishal"(lower case) and > getting the output as "Vishal"(V is Upper Case) > > How do I solve this problem if I want to go with case sensitive > retrival of data. > > I have gone thru some string functions available but could not find > one. > Any help would be appreciated.. > > > regards > vishal. >
Post Follow-up to this messageif you want to search CASE Sensitive you have to change the coallation of your column / table or Query: CS_AS means (C)ase (S)ensitive, (A)ccent (S)ensitive SELECT ENAME FROM EMPTABLE WHERE ENAME COLLATE SQL_Latin1_General_C P1_CS_AS ="vishal" HTH, Jens Suessmeyer.
Post Follow-up to this messageAnother workaround I used in SQL 7.0 a lot would be: SELECT ENAME FROM EMPTABLE WHERE CONVERT (varbinar(255),ENAME ) = CONVERT(varbinary(25 5), 'vishal') Markus
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread