Sample Header Ad - 728x90

Count number of digits in one field

0 votes
1 answer
107 views
I'm trying to come up with a code that would count the number of digits in one field. in this case it's passports I want to make sure they have valid digits and characters. select p.passport_nbr, CASE WHEN Number = 0 THEN 1 ELSE FLOOR(LOG10(ABS(p.passport_nbr))) + 1 AS NDigits , is there a different code I can use. I use oracle sql
Asked by Mira (3 rep)
Mar 8, 2024, 03:48 PM
Last activity: Mar 9, 2024, 02:49 PM