Find ALL rows where you have non-numeric characters only:select ROW_SEQ#, STRING#
Find ALL rows where you have numeric characters only:
from TMP_DATA
WHERE length(STRING#)
- Length( TRANSLATE(STRING#, CHR(1)||TRANSLATE(String#,
CHR(1)||'1234567890', CHR(1) ), CHR(1) ) ) > 0
;
Find ALL rows where you have numeric characters only:
select ROW_SEQ#, STRING#
from TMP_DATA
WHERE length(STRING#)
- Length( TRANSLATE(STRING#, CHR(1)||TRANSLATE(String#,
CHR(1)||'1234567890', CHR(1) ), CHR(1) ) ) = 0
;
2 comments:
We can use the below query to get the non-numeric column records in a table
select order_status from orders where TRANSLATE (order_status, CHR (1) || '1234567890', CHR (1)) is not null
Sounds good. Thanks!
Post a Comment