Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Check row is Numeric or not - response (6) by mohan.mscss

$
0
0
try with reursive, hope it can help you   with recursive r2(id, st, L, c, rstr) as ( sel id,str as st, char(st) as L, 1 as c, trim(case when position(substr(st,1,1) in 'abcdefghijklmnopqrstuvwxyz~!@#$%^&*()_+-=<>,.?:;"'') > 0 then 1 else 0 as rstr from revString union all sel r2.id,r2.st, char(st) as L, c+1 as c, rstr || trim(case when position(substr(r2.st,c+1,1) in 'abcdefghijklmnopqrstuvwxyz~!@#$%^&*()_+-=<>,.?:;"'') > 0 then 0 else 1 as rstr from  r2 where rstr = 0 and L <> c )sel case when rstr = 0 then 'Numeric' else 'Non-numeric' from r2 order by id,4 desc ;   @zaeru: Isnumeric is SQL version, Not TD function..

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>