Friday 21 December 2018

How to find out how many data are in the colums are in the upper case in sql server

In Most of the interview, Interviewer asked write down a query to find out the how many rows have upper case data.


so here is the answer to crack this question in the interview.


select * from T(table_name)
  where fld(coloum_name) = upper(fld) collate SQL_Latin1_General_CP1_CS_AS
You can force to check the case sensitive collation.

No comments:

Post a Comment

AdSense

The Ultimate Guide to Interceptors: Understanding Their Power and Functionality

  The Ultimate Guide to Interceptors: Understanding Their Power and Functionality An interceptor is a service that can intercept HTTP reques...

Follow