Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to check lowercase letters in a string value?

Status
Not open for further replies.

mkey

Programmer
Oct 3, 2001
288
CA
hi all,
i need to check if a column that is in varchar2 datatype to check if the column contain any lowercase letters.

This is how i did the same check in sql server2000. how do I do something similar in oracle 8i?

SELECT id FROM table_name
WHERE CAST(column_name AS VARbinary) <> CAST(upper(column_name) AS varbinary)

thank you!
 
ELECT id FROM table_name
WHERE column_name <> upper(column_name) ; I tried to remain child-like, all I acheived was childish.
 
the only way you can check is by checking the ascii value of the first character of the column

ex : column name ename table emp

select ename from emp
where ascii(substr(ename,1,1)) between 97 and 122;

Hope this help to solve your issue
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top